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

This page contains top rated real world PHP examples of method Schema::table from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples

table() public static method

Modify a table on the schema.
public static table ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint
$table string
$callback Closure
return Illuminate\Database\Schema\Blueprint
Example #1
Show file File: 2016_08_20_031333_add_foreign_keys_to_pages_closure_table.php Project: sodacms/sodacms
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('pages_closure', function (Blueprint $table) {
         $table->dropForeign('FK_pages_closure_pages');
         $table->dropForeign('FK_pages_closure_pages_2');
     });
 }
Example #2
Show file File: 2014_03_02_154438_add_book_from_to_cols_bookings_table.php Project: madiarsa/laravel-4.1-car-rental-site
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('bookings', function ($table) {
         $table->dropColumn('book_from');
         $table->dropColumn('book_to');
     });
 }
Example #3
Show file File: 2014_01_01_000000_create_activity_log_table.php Project: mvpasarel/activity-log-saas
0
 /**
  * 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');
     });
 }
Example #4
Show file File: 2015_06_04_152043_create_posts_table.php Project: py1903/My-Blog-Creator
0
 public function down()
 {
     Schema::table('posts', function (Blueprint $table) {
         $table->dropForeign('posts_user_id_foreign');
     });
     Schema::drop('posts');
 }
Example #5
Show file File: 2016_03_03_064630_add_department_to_aluminis_table.php Project: kinnngg-lenz/csacerc
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('aluminis', function (Blueprint $table) {
         $table->dropForeign('aluminis_department_id_foreign');
         $table->dropColumn('department_id');
     });
 }
Example #6
Show file File: 2014_09_16_172244_rename_columna_especial_cost_to_special_cost_in_auditoriums.php Project: filmoteca/filmoteca
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('auditoriums', function (Blueprint $table) {
         $table->renameColumn('address', 'direction');
         $table->renameColumn('special_cost', 'especial_cost');
     });
 }
Example #7
Show file File: 2015_10_26_173423_add_foreign_keys_to_reg_vocabulary_has_version_table.php Project: jonphipps/api-registry
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('reg_vocabulary_has_version', function (Blueprint $table) {
         $table->dropForeign('reg_vocabulary_has_version_ibfk_1');
         $table->dropForeign('reg_vocabulary_has_version_ibfk_2');
     });
 }
Example #8
Show file File: 2015_05_27_022945_add_professions.php Project: katzumi/talent4startups
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::drop('professions');
     Schema::table('profiles', function (Blueprint $table) {
         $table->dropColumn('profession_id');
     });
 }
Example #9
Show file File: 2015_01_21_034728_add_admin_to_users.php Project: Liongold/paperwork
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     //
     Schema::table('users', function (Blueprint $table) {
         $table->dropColumn('is_admin');
     });
 }
Example #10
Show file File: 2015_09_06_094829_create_table_users.php Project: nickterekhin/sj2
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function (Blueprint $table) {
         //
         $table->drop();
     });
 }
Example #11
Show file File: 2015_11_04_153919_create_sprites_table.php Project: jaflo/sprites
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table("sprites", function ($table) {
         $table->dropIndex("search");
     });
     Schema::drop("sprites");
 }
Example #12
Show file File: 2014_04_18_041612_alter_users_table.php Project: jm-comentum/kendo-laravel-hybrid-app-starter-kit
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function ($table) {
         //-- Custom Column Name
         Schema::drop('users');
     });
 }
Example #13
Show file File: 2014_09_11_160727_alter_planes_cobertura_timestamps.php Project: armandolazarte/clinicasapp
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('planes_cobertura', function (Blueprint $table) {
         $table->dropColumn('updated_at');
         $table->dropColumn('created_at');
     });
 }
Example #14
Show file File: 2016_04_18_181328_oauth_identities_table.php Project: alvaradoadam15/laraveltube
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table($this->authenticationProvidersTable, function (Blueprint $table) {
         $table->dropForeign('oauth_identities_user_id_foreign');
     });
     Schema::drop($this->authenticationProvidersTable);
 }
Example #15
Show file File: 2015_05_18_100452_add_location_id_to_responses.php Project: mymedialab/listenings
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('interview', function (Blueprint $t) {
         $t->dropForeign('location_id');
         $t->dropColumn('location_id');
     });
 }
Example #16
Show file File: 2015_11_11_091928_add_soft_delete_to_users.php Project: Munk91/Hovedopgave
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function (Blueprint $table) {
         //
         $table->dropColumn('soft_deleted');
     });
 }
Example #17
Show file File: 2015_09_25_025807_alter_project_tasks_table.php Project: adrianodrix/codeproject.dev
0
 /**
  * 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();
     });
 }
Example #18
Show file File: 2015_12_21_150607_add_field_contract_type_to_bids.php Project: imsgithub/hotlot.com
0
 /**
  * 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');
 }
Example #19
Show file File: 2015_12_02_132747_add_oauth_at_users_table.php Project: ryamamoto/laravel5-sample-tasklist
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function (Blueprint $table) {
         $table->dropColumn('oauth_flg');
         $table->dropColumn('oauth_id');
     });
 }
Example #20
Show file File: 2015_12_11_145957_update_admins_table.php Project: shayan-ys/online_shop
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('admins', function ($table) {
         $table->dropColumn('email');
         $table->dropColumn('password');
     });
 }
Example #21
Show file File: 2014_10_11_130029_add_foreign_keys_to_rss_table.php Project: vmariano/shared-links-ranking
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('rss', function (Blueprint $table) {
         $table->dropForeign('fk_rss_1');
         $table->dropForeign('rss_ibfk_1');
     });
 }
Example #22
Show file File: 2015_12_15_173640_add_user_columns.php Project: punkrockio/Sample-Web-App
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('users', function (Blueprint $table) {
         $table->dropColumn('phone');
         $table->dropColumn('facebook');
     });
 }
Example #23
Show file File: 2016_02_04_012915_drop_fk_partido_goles_jugadores.php Project: 00dav00/marcadores-minimal
0
 public function down()
 {
     Schema::table('partido_goles', function (Blueprint $table) {
         $table->foreign('gol_autor')->references('pju_id')->on('partido_jugadores')->onDelete('restrict');
         $table->foreign('gol_asistencia')->references('pju_id')->on('partido_jugadores')->onDelete('restrict');
     });
 }
Example #24
Show file File: 2015_09_02_131456_add_tiers_to_stack_actions_table.php Project: Hoasted/laravel-5-boilerplate
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('stack_actions', function (Blueprint $table) {
         $table->dropForeign('stack_actions_tier_id_foreign');
         $table->dropColumn('tier_id');
     });
 }
Example #25
Show file File: 2013_10_30_104107_add_tag_section_fields.php Project: sdlyhu/laravelio
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('tags', function ($t) {
         $t->dropColumn('forum');
         $t->dropColumn('articles');
     });
 }
Example #26
Show file File: 2016_04_08_024641_add_section_duration_and_track_column_to_musics_table.php Project: WangWeigao/m1
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('musics', function (Blueprint $table) {
         $table->dropColumn('section_duration');
         $table->dropColumn('track');
     });
 }
Example #27
Show file File: 2016_05_28_145709_add_class_number_to_landing.php Project: Kaelcao/colormev2
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     //
     Schema::table('landing', function (Blueprint $table) {
         $table->integer('class_number')->default(1);
     });
 }
Example #28
Show file File: 2015_12_25_094522_add_forign_key_menus_table.php Project: erekle1/adrenalini
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::table('menus', function (Blueprint $table) {
         $table->foreign('page_id')->references('id')->on('pages')->onDelete('cascade');
         $table->unique(['page_id', 'id']);
     });
 }
Example #29
Show file File: 2015_11_14_103417_add_time_tests_table.php Project: simple-code-simple/blog
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('tests', function (Blueprint $table) {
         //
         $table->dropColumn('time');
     });
 }
Example #30
Show file File: 2015_07_30_070225_add_list_id_to_tasks.php Project: ahuggins/taskr
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('tasks', function (Blueprint $table) {
         $table->dropColumn('list_id');
         $table->dropForeign('tasks_list_id_foreign');
     });
 }