有什么好的方法吗?我目前通过以我想要的顺序的相反顺序列出列来做到这一点:
Schema::table('some_table', function($table){
$table->string('new_col_2')->after('existing_col'); //How to specify that this should come after new_col_1?
$table->string('new_col_1')->after('existing_col');
});
最佳答案
你试过吗:
Schema::table('some_table', function($table){
$table->string('new_col_1')->after('existing_col');
$table->string('new_col_2')->after('new_col_1');
}
关于laravel - 如何在 Laravel 迁移中的特定列之后订购多个新列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53671239/