Maison >développement back-end >tutoriel php >laravel 修改了数据库迁移文件,怎么操作才能提交到数据库
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