首页  >  文章  >  后端开发  >  laravel 修改了数据库迁移文件,怎么操作才能提交到数据库

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

WBOY
WBOY原创
2016-06-06 20:33:111030浏览

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