Advertisement
Guest User

Untitled

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