小编son*_*ade的帖子

Laravel - 使用 php artisan make:migration 立即将两列添加到现有表中

我是新手laravel,我想知道我们不能使用以下方法将两列添加到现有表中

php artisan make:migration 
Run Code Online (Sandbox Code Playgroud)

立即为Ex。如果我的用户表包含iduser_name现在我想在其中添加两个新列,例如 asuser_phoneuser_email

php artisan make:migration add_user_phone_to_users_table add_user_email_to_users_table 
Run Code Online (Sandbox Code Playgroud)

类似的东西?我很抱歉如果我的问题是错误的..我可以将新字段一一添加到两个单独的迁移中,但想知道是否可以一次将两个新列添加到现有表中。预先感谢,希望我能得到满意的答复。

migration laravel

1
推荐指数
1
解决办法
9208
查看次数

标签 统计

laravel ×1

migration ×1