bigIncrements('id');
$table->bigInteger('user_id')->unsigned()->nullable();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->date('date')->nullable();
$table->dateTime('completed_at')->nullable();
$table->text('options')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('todos', function(Blueprint $table)
{
$table->dropForeign('todos_user_id_foreign');
});
Schema::dropIfExists('todos');
}
}