PHP Method Schema::connection, someline-starter Code Examples

This page contains top rated real world PHP examples of method Schema::connection from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples
Frequently Used Methods
Example #1
Show file File: 2014_09_11_083413_create_courses_table.php Project: nagyist/abge
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('courses', function ($table) {
         $table->increments('id');
         $table->string('title');
         $table->text('description');
         $table->longText('header');
         $table->longText('address');
         $table->date('start');
         $table->date('end');
         $table->integer('min');
         $table->integer('max');
         $table->longText('min_message');
         $table->longText('max_message');
         $table->integer('company_id');
         $table->integer('category_id');
         $table->integer('event_id');
         $table->string('route');
         $table->string('image');
         $table->string('type');
         $table->string('status');
         $table->timestamps();
         $table->softDeletes();
     });
 }
Example #2
Show file File: 2014_11_30_210124_RoleTable.php Project: za-web/l5-app
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('roles', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
     });
 }
Example #3
Show file File: 2015_12_02_015413_create_pacientes1.php Project: nhom5UET/tichhophethong
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     //
     Schema::connection('mysql2')->table('pacientes', function ($table) {
         $table->timestamps();
     });
 }
Example #4
Show file File: 2014_09_26_060235_CreatePlayerTable.php Project: maxupunk/metin2cms
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     /* We create the table more for testing reason, because every server should have a database */
     if (!Schema::connection('player')->hasTable('player')) {
         DB::connection('player')->unprepared(file_get_contents(__DIR__ . '/sql/player.sql'));
     }
 }
Example #5
Show file File: 2015_09_27_000000_store_setup_loadout_table2.php Project: brucewu16899/WebPanel-Core
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     //Remove the owner id as foreign key
     Schema::connection('store')->table('loadouts', function (Blueprint $table) {
         $table->dropForeign('owner_id');
     });
 }
Example #6
Show file File: InstallServiceProvider.php Project: marcmascarell/laravel-artificer
0
 public static function isExtensionDriverReady()
 {
     $driver = config('admin.extension_driver');
     $connectionName = config('admin.extension_drivers.database.connection');
     $migrationsTable = config('admin.migrations');
     return $driver == 'file' || $driver == 'database' && \Schema::connection($connectionName)->hasTable($migrationsTable);
 }
Example #7
Show file File: 2014_05_20_203612_ff-mt-em-payment.php Project: fintech-fab/money-transfer-emulator
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection('ff-mt-em')->dropIfExists('payments');
     Schema::connection('ff-mt-em')->dropIfExists('terminals');
     Schema::connection('ff-mt-em')->dropIfExists('cities');
     Schema::connection('ff-mt-em')->dropIfExists('fee');
 }
Example #8
Show file File: 2016_01_28_225624_add_columns_to_accounts_table.php Project: huludini/aura-kingdom-web
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection('account')->table('accounts', function (Blueprint $table) {
         $table->dropColumn('created_at');
         $table->dropColumn('updated_at');
     });
 }
Example #9
Show file File: 2015_05_02_000000_webpanel_entrust_setup_tables.php Project: brucewu16899/WebPanel-Core
0
 /**
  * Reverse the migrations.
  *
  * @return  void
  */
 public function down()
 {
     Schema::connection('webpanel')->drop('permission_role');
     Schema::connection('webpanel')->drop('permissions');
     Schema::connection('webpanel')->drop('role_user');
     Schema::connection('webpanel')->drop('roles');
 }
Example #10
Show file File: 2015_05_19_000002_hws_ssl_hostnames_drop_hostname_id.php Project: hyn/webserver
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection(DatabaseConnection::systemConnectionName())->table('ssl_hostnames', function (Blueprint $table) {
         // domain relation
         $table->bigInteger('hostname_id')->unsigned();
     });
 }
Example #11
Show file File: 2016_02_01_145513_create_estates_table.php Project: rdunin/Laravel5
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql2')->create('estates', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title')->nullable();
         $table->string('price')->nullable();
         $table->string('price2')->nullable();
         $table->string('metrs')->nullable();
         $table->string('metrs2')->nullable();
         $table->string('floor')->nullable();
         $table->string('floors')->nullable();
         $table->string('room')->nullable();
         $table->string('adress')->nullable();
         $table->string('rayon')->nullable();
         $table->string('street')->nullable();
         $table->string('dom')->nullable();
         $table->string('date')->nullable();
         $table->text('desc')->nullable();
         $table->text('info')->nullable();
         $table->boolean('active')->default(true);
         $table->timestamp('last_up')->nullable();
         $table->timestamp('published_at')->nullable();
         $table->boolean('published')->default(false);
         $table->timestamps();
     });
 }
Example #12
Show file File: 2015_07_04_000000_store_setup_loadout_table.php Project: brucewu16899/WebPanel-Core
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     //Delete the store_users_loadouts table
     Schema::connection('store')->drop('users_loadouts');
     //Delete the privacy and owner_id column from the loadouts table
     Schema::connection('store')->table('loadouts', function (Blueprint $table) {
         $table->dropColumn('privacy');
         $table->dropColumn('owner_id');
     });
     // Create the store_users_items_loadouts table
     Schema::connection('store')->create('users_items_loadouts', function (Blueprint $table) {
         $table->engine = "InnoDB";
         $table->increments('id');
         $table->integer('useritem_id')->unsigned();
         $table->integer('loadout_id')->unsigned();
         $table->timestamps();
         $table->foreign('useritem_id')->references('id')->on('users_items')->onUpdate('cascade')->onDelete('cascade');
         $table->foreign('loadout_id')->references('id')->on('loadouts')->onUpdate('cascade')->onDelete('cascade');
     });
     //Delete the store_items_loadouts table
     Schema::connection('store')->drop('items_loadouts');
     //Delete the privacy and owner_id column from the loadouts table
     Schema::connection('store')->table('users', function (Blueprint $table) {
         $table->dropColumn('token');
         $table->dropColumn('ip');
     });
 }
Example #13
Show file File: 2015_01_01_133337_chat_base_tables.php Project: ppy/osu-web
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::connection('mysql-chat');
     $builder->drop('channels');
     $builder->drop('messages');
     $builder->drop('messages_private');
 }
Example #14
Show file File: 2016_04_13_185417_add_moderated_flag_to_channel.php Project: ppy/osu-web
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::connection('mysql-chat');
     $builder->table('channels', function ($table) {
         $table->dropColumn('moderated');
     });
 }
Example #15
Show file File: 2015_11_03_120037_admins.php Project: ivcomsoft/larivauth
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $connections = Config::get('database.connections');
     foreach ($connections as $connection) {
         Schema::connection(self::$connection)->dropIfExists(self::$tableName);
     }
 }
Example #16
Show file File: 2016_02_05_215730_add_columns_to_tb_users_table.php Project: huludini/aura-kingdom-web
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection('member')->table('tb_user', function (Blueprint $table) {
         $table->dropColumn('created_at');
         $table->dropColumn('updated_at');
     });
 }
Example #17
Show file File: 2015_01_01_133337_multiplayer_base_tables.php Project: ameliaikeda/osu-web
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::connection('mysql-mp');
     $builder->drop('events');
     $builder->drop('game_scores');
     $builder->drop('games');
     $builder->drop('matches');
 }
Example #18
Show file File: 2015_12_02_030600_create_pacientes2.php Project: nhom5UET/tichhophethong
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     //
     Schema::connection('mysql3')->table('ck_patient', function ($table) {
         $table->integer("contact_id");
         $table->timestamps();
     });
 }
Example #19
Show file File: 2015_12_12_012546_create_pass_profiles_table.php Project: Dev1436/laravel-securepassgen
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     // If DB file exists delete it
     if (Storage::exists(database_path('SPGProfileDB.sqlite'))) {
         Storage::delete(database_path('SPGProfileDB.sqlite'));
     }
     Schema::connection($this->TargetDB)->drop('pass_profiles');
 }
Example #20
Show file File: 2014_10_12_100000_create_password_resets_table.php Project: swordyt/work
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('work')->create('password_resets', function (Blueprint $table) {
         $table->string('email')->index();
         $table->string('token')->index();
         $table->timestamp('created_at');
     });
 }
Example #21
Show file File: 2015_10_05_000000_save_equipped_loadout_with_user.php Project: brucewu16899/WebPanel-Core
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     //Remove the owner id as foreign key
     Schema::connection('store')->table('users', function (Blueprint $table) {
         $table->dropForeign('eqp_loadout_id');
         $table->dropColumn('eqp_loadout_id');
     });
 }
Example #22
Show file File: 2014_09_29_060156_create_product_order_dates_table.php Project: bryanestrito/datawarehouse_etl
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('product_order_dates', function (Blueprint $table) {
         $table->increments('id');
         $table->date('order_date');
         $table->timestamps();
     });
 }
Example #23
Show file File: 2014_09_29_055738_create_product_statuses_table.php Project: bryanestrito/datawarehouse_etl
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('product_statuses', function (Blueprint $table) {
         $table->increments('id');
         $table->text('description');
         $table->timestamps();
     });
 }
Example #24
Show file File: 2014_07_06_153235_change_column_signal_sid_in_rules.php Project: fintech-fab/actions-calc
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection('ff-actions-calc')->table('rules', function (Blueprint $table) {
         $table->dropColumn('signal_sid');
     });
     Schema::connection('ff-actions-calc')->table('rules', function (Blueprint $table) {
         $table->string('signal_sid');
     });
 }
Example #25
Show file File: 2016_01_26_113213_model_setup.php Project: juanjolainez/SecondLife
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection('mysql')->drop('categories');
     Schema::connection('mysql')->drop('reports');
     Schema::drop('user_accounts');
     Schema::drop('users');
     Schema::drop('chats');
     Schema::drop('products');
 }
Example #26
Show file File: 2014_10_02_014948_create_branches_table.php Project: bryanestrito/datawarehouse_etl
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('pgsql')->create('branches', function (Blueprint $table) {
         $table->increments('id');
         $table->text('name');
         $table->text('address');
         $table->timestamps();
     });
 }
Example #27
Show file File: 2014_10_12_000000_create_users_table.php Project: za-web/l5-app
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('users', function (Blueprint $table) {
         $table->increments('id');
         $table->string('email')->unique();
         $table->string('password', 60);
         $table->rememberToken();
         $table->timestamps();
     });
 }
Example #28
Show file File: ArtisanCustomMigrationTest.php Project: codengine/laravel-custom-migrations
0
 public function testMigratorUsesSpecificDatabaseConnection()
 {
     $this->executeDefaultMigration(array('--database' => 'artisantest_custom_two'));
     $this->resetLaravelPaths();
     $this->assertTrue(Schema::connection('artisantest_custom_two')->hasTable('test_tbl'));
     $this->assertFalse(Schema::connection('artisantest_default')->hasTable('test_tbl'));
     $this->assertFalse(Schema::connection('artisantest_custom')->hasTable('test_tbl'));
     $entry = $this->app['db']->connection('artisantest_custom_two')->table('test_tbl')->where('id', 1)->first();
     $this->assertEquals($this->testType, $entry->test_val);
 }
Example #29
Show file File: 2014_10_12_000000_create_person_documents_table.php Project: ThunderID/HRIS-API
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection(env('DB_CONNECTION_PERSON', 'mysql_hr_persons'))->create('person_documents', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('person_id')->unsigned()->index();
         $table->json('documents');
         $table->timestamps();
         $table->softDeletes();
     });
 }
Example #30
Show file File: 2014_11_30_210243_user_role_table.php Project: za-web/l5-app
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('users_roles', function (Blueprint $table) {
         $table->integer('user_id')->unsigned()->index();
         $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
         $table->integer('role_id')->unsigned()->index();
         $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
         $table->timestamps();
     });
 }