Skip to content

Instantly share code, notes, and snippets.

@shellprog
Last active April 26, 2018 18:28
Show Gist options
  • Save shellprog/e6ec96f839f47d660c56d60f711cd1cf to your computer and use it in GitHub Desktop.
Save shellprog/e6ec96f839f47d660c56d60f711cd1cf to your computer and use it in GitHub Desktop.
CreateTasksTable
<?php
 
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
 
class CreateTasksTable extends Migration {
 
    public function up()
    {
        Schema::create('tasks', function(Blueprint $table)
        {
            $table->create();
            $table->increments("id");
            $table->string("title", 255);
            $table->enum('status', array('0', '1'))->default('0');
            $table->timestamps();
        });
    }
 
 
    public function down()
    {
        Schema::drop('tasks');
    }
 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment