当前位置: 首页>>代码示例>>PHP>>正文


PHP Schema::connection方法代码示例

本文整理汇总了PHP中Schema::connection方法的典型用法代码示例。如果您正苦于以下问题:PHP Schema::connection方法的具体用法?PHP Schema::connection怎么用?PHP Schema::connection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Schema的用法示例。


在下文中一共展示了Schema::connection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::connection('mysql')->create('roles', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
     });
 }
开发者ID:za-web,项目名称:l5-app,代码行数:12,代码来源:2014_11_30_210124_RoleTable.php

示例2: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     //
     Schema::connection('mysql2')->table('pacientes', function ($table) {
         $table->timestamps();
     });
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:12,代码来源:2015_12_02_015413_create_pacientes1.php

示例3: up

 /**
  * 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'));
     }
 }
开发者ID:maxupunk,项目名称:metin2cms,代码行数:12,代码来源:2014_09_26_060235_CreatePlayerTable.php

示例4: down

 /**
  * 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');
     });
 }
开发者ID:brucewu16899,项目名称:WebPanel-Core,代码行数:12,代码来源:2015_09_27_000000_store_setup_loadout_table2.php

示例5: isExtensionDriverReady

 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);
 }
开发者ID:marcmascarell,项目名称:laravel-artificer,代码行数:7,代码来源:InstallServiceProvider.php

示例6: down

 /**
  * 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');
 }
开发者ID:fintech-fab,项目名称:money-transfer-emulator,代码行数:12,代码来源:2014_05_20_203612_ff-mt-em-payment.php

示例7: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::connection('account')->table('accounts', function (Blueprint $table) {
         $table->dropColumn('created_at');
         $table->dropColumn('updated_at');
     });
 }
开发者ID:huludini,项目名称:aura-kingdom-web,代码行数:12,代码来源:2016_01_28_225624_add_columns_to_accounts_table.php

示例8: down

 /**
  * 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');
 }
开发者ID:brucewu16899,项目名称:WebPanel-Core,代码行数:12,代码来源:2015_05_02_000000_webpanel_entrust_setup_tables.php

示例9: down

 /**
  * 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();
     });
 }
开发者ID:hyn,项目名称:webserver,代码行数:12,代码来源:2015_05_19_000002_hws_ssl_hostnames_drop_hostname_id.php

示例10: up

 /**
  * 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();
     });
 }
开发者ID:rdunin,项目名称:Laravel5,代码行数:31,代码来源:2016_02_01_145513_create_estates_table.php

示例11: down

 /**
  * 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');
     });
 }
开发者ID:brucewu16899,项目名称:WebPanel-Core,代码行数:32,代码来源:2015_07_04_000000_store_setup_loadout_table.php

示例12: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::connection('mysql-chat');
     $builder->drop('channels');
     $builder->drop('messages');
     $builder->drop('messages_private');
 }
开发者ID:ppy,项目名称:osu-web,代码行数:12,代码来源:2015_01_01_133337_chat_base_tables.php

示例13: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::connection('mysql-chat');
     $builder->table('channels', function ($table) {
         $table->dropColumn('moderated');
     });
 }
开发者ID:ppy,项目名称:osu-web,代码行数:12,代码来源:2016_04_13_185417_add_moderated_flag_to_channel.php

示例14: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $connections = Config::get('database.connections');
     foreach ($connections as $connection) {
         Schema::connection(self::$connection)->dropIfExists(self::$tableName);
     }
 }
开发者ID:ivcomsoft,项目名称:larivauth,代码行数:12,代码来源:2015_11_03_120037_admins.php

示例15: down

 /**
  * 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');
 }
开发者ID:ameliaikeda,项目名称:osu-web,代码行数:13,代码来源:2015_01_01_133337_multiplayer_base_tables.php


注:本文中的Schema::connection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。