当前位置:Gxlcms > PHP教程 > laravel修改了数据库迁移文件,怎么操作才能提交到数据库

laravel修改了数据库迁移文件,怎么操作才能提交到数据库

时间:2021-07-01 10:21:17 帮助过:3人阅读

Schema::create('vilays', function (Blueprint $table) {
$table->increments('id');
$table->string('name',36)->change();
$table->tinyInteger('user_id')->unsigned();
$table->timestamp('utime');
$table->timestamps();
});

执行php artisan migrate 提示nothing to migrate

回复内容:

Schema::create('vilays', function (Blueprint $table) {
$table->increments('id');
$table->string('name',36)->change();
$table->tinyInteger('user_id')->unsigned();
$table->timestamp('utime');
$table->timestamps();
});

执行php artisan migrate 提示nothing to migrate

php artisan migrate:rollback,然后修改文件***_create_vilays_table.php,再php artisan migrate

人气教程排行