Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5.  
  6. class CreateCityColumnInLocationTable extends Migration {
  7.  
  8.     /**
  9.      * Run the migrations.
  10.      *
  11.      * @return void
  12.      */
  13.     public function up()
  14.     {
  15.         Schema::table('locations', function($table)
  16.         {
  17.             $table->string('city');
  18.         });
  19.     }
  20.  
  21.     /**
  22.      * Reverse the migrations.
  23.      *
  24.      * @return void
  25.      */
  26.     public function down()
  27.     {
  28.         Schema::table('locations', function($table)
  29.         {
  30.             $table->dropColumn('city');
  31.         });
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement