[英]Can't we rewrite migration table and reset the migration file instead of using column modifiers?
I'm a bit confused with this. 我对此有些困惑。 Can't we just rewrite the migration table and reset the migration instead of using modifying column modifiers?
我们不能只改写迁移表并重置迁移,而不是使用修改列修饰符吗? For eg.
例如。
$table->string('name', 50)->change();
can't we just change the size to 25 (say) and refresh the migration instead of using change()? 我们不能仅将大小更改为25(例如)并刷新迁移,而不是使用change()吗? What difference does it make?
有什么区别?
Yes, I just do this: 是的,我只是这样做:
php artisan migrate:refresh --seed
This will drop the tables, recreate them and populate them using your seeders. 这将删除表,重新创建它们,并使用播种器填充它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.