Maison  >  Article  >  développement back-end  >  laravel 修改了数据库迁移文件,怎么操作才能提交到数据库

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

WBOY
WBOYoriginal
2016-06-06 20:33:111031parcourir

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

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn