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

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

WBOY
WBOYOriginal
2016-06-06 20:33:111031browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn