public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
});
}
カラムを追加して、もう一度migrateしたい時
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->text('body');
$table->timestamps();
});
}
一度migrateした後、修正してphp artisan migrateとしてもnothing to doとなる
$ php artisan migrate
Nothing to migrate.
そのような場合は、
$ php artisan migrate:reset
$ php artisan migrate