/** * Run the migrations. * * @return void */ public function up() { Schema::create('projects', function (Blueprint $table) { $table->increments('id'); $table->string('name'); // $table->enum('status', ['new', 'process', 'complete', 'cancelled'])->default('new'); $table->enum('status', array_keys(App\Project::getStatus()))->default('0'); $table->date('plan_started_at'); $table->date('plan_finished_at'); $table->date('real_started_at'); $table->date('real_finished_at'); $table->float('price'); $table->boolean('is_archive')->default(FALSE); $table->integer('customer_id')->unsigned()->nullable(); $table->foreign('customer_id')->references('id')->on('customers'); }); }