首頁  >  文章  >  後端開發  >  laravel 修改了数据库迁移文件,怎么操作才能提交到数据库

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

WBOY
WBOY原創
2016-06-06 20:33:111031瀏覽

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

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn