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


PHP Schema::table方法代码示例

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


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

示例1: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('rss', function (Blueprint $table) {
         $table->dropForeign('fk_rss_1');
         $table->dropForeign('rss_ibfk_1');
     });
 }
开发者ID:vmariano,项目名称:shared-links-ranking,代码行数:12,代码来源:2014_10_11_130029_add_foreign_keys_to_rss_table.php

示例2: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('tags', function ($t) {
         $t->dropColumn('forum');
         $t->dropColumn('articles');
     });
 }
开发者ID:sdlyhu,项目名称:laravelio,代码行数:12,代码来源:2013_10_30_104107_add_tag_section_fields.php

示例3: down

 public function down()
 {
     Schema::table('posts', function (Blueprint $table) {
         $table->dropForeign('posts_user_id_foreign');
     });
     Schema::drop('posts');
 }
开发者ID:py1903,项目名称:My-Blog-Creator,代码行数:7,代码来源:2015_06_04_152043_create_posts_table.php

示例4: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function (Blueprint $table) {
         $table->dropColumn('oauth_flg');
         $table->dropColumn('oauth_id');
     });
 }
开发者ID:ryamamoto,项目名称:laravel5-sample-tasklist,代码行数:12,代码来源:2015_12_02_132747_add_oauth_at_users_table.php

示例5: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('project_tasks', function (Blueprint $table) {
         $table->date('start_date')->unsigned()->change();
         $table->date('due_date')->unsigned()->change();
     });
 }
开发者ID:adrianodrix,项目名称:codeproject.dev,代码行数:12,代码来源:2015_09_25_025807_alter_project_tasks_table.php

示例6: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('auditoriums', function (Blueprint $table) {
         $table->renameColumn('address', 'direction');
         $table->renameColumn('special_cost', 'especial_cost');
     });
 }
开发者ID:filmoteca,项目名称:filmoteca,代码行数:12,代码来源:2014_09_16_172244_rename_columna_especial_cost_to_special_cost_in_auditoriums.php

示例7: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('aluminis', function (Blueprint $table) {
         $table->dropForeign('aluminis_department_id_foreign');
         $table->dropColumn('department_id');
     });
 }
开发者ID:kinnngg-lenz,项目名称:csacerc,代码行数:12,代码来源:2016_03_03_064630_add_department_to_aluminis_table.php

示例8: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('interview', function (Blueprint $t) {
         $t->dropForeign('location_id');
         $t->dropColumn('location_id');
     });
 }
开发者ID:mymedialab,项目名称:listenings,代码行数:12,代码来源:2015_05_18_100452_add_location_id_to_responses.php

示例9: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('activity_logs', function (Blueprint $table) {
         $table->increments('id');
         $table->integer(Config::get('activity-log-saas::key'));
         $table->integer('user_id');
         $table->integer('content_id');
         $table->string('content_type', 72);
         $table->string('action', 32);
         $table->string('description');
         $table->text('details');
         $table->boolean('developer');
         $table->string('ip_address', 64);
         $table->string('user_agent');
         $table->timestamps();
     });
     Schema::table('activity_logs', function ($table) {
         // We'll need to ensure that MySQL uses the InnoDB engine to
         // support the indexes, other engines aren't affected.
         $table->engine = 'InnoDB';
         // Useful for filters
         $table->index('user_id');
         $table->index('content_id');
         $table->index('content_type');
         $table->index('action');
     });
 }
开发者ID:mvpasarel,项目名称:activity-log-saas,代码行数:32,代码来源:2014_01_01_000000_create_activity_log_table.php

示例10: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('bookings', function ($table) {
         $table->dropColumn('book_from');
         $table->dropColumn('book_to');
     });
 }
开发者ID:madiarsa,项目名称:laravel-4.1-car-rental-site,代码行数:12,代码来源:2014_03_02_154438_add_book_from_to_cols_bookings_table.php

示例11: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function (Blueprint $table) {
         //
         $table->dropColumn('soft_deleted');
     });
 }
开发者ID:Munk91,项目名称:Hovedopgave,代码行数:12,代码来源:2015_11_11_091928_add_soft_delete_to_users.php

示例12: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('bids', function (Blueprint $table) {
         $table->dropForeign('bids_contract_type_id_foreign');
     });
     Schema::drop('contract_type');
 }
开发者ID:imsgithub,项目名称:hotlot.com,代码行数:12,代码来源:2015_12_21_150607_add_field_contract_type_to_bids.php

示例13: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     //
     Schema::table('users', function (Blueprint $table) {
         $table->dropColumn('is_admin');
     });
 }
开发者ID:Liongold,项目名称:paperwork,代码行数:12,代码来源:2015_01_21_034728_add_admin_to_users.php

示例14: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::drop('professions');
     Schema::table('profiles', function (Blueprint $table) {
         $table->dropColumn('profession_id');
     });
 }
开发者ID:katzumi,项目名称:talent4startups,代码行数:12,代码来源:2015_05_27_022945_add_professions.php

示例15: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table("sprites", function ($table) {
         $table->dropIndex("search");
     });
     Schema::drop("sprites");
 }
开发者ID:jaflo,项目名称:sprites,代码行数:12,代码来源:2015_11_04_153919_create_sprites_table.php


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