Add sql table column before or after specific other column - by migrations in Laravel 4.1

前端 未结 5 1460
遇见更好的自我
遇见更好的自我 2020-12-14 05:56

Table \'users\':

|id|name|address|post_code|deleted_at|created_at|

and I want add column \'phone_nr\' somewhere between \'id\' and \'delete

5条回答
  •  情深已故
    2020-12-14 06:04

    The answer by James is still correct. However, Laravel 5 has slightly changed the make migration syntax:

    php artisan make:migration add_google_auth_to_users_table --table=users
    

    (I am aware this question is tagged Laravel 4, however it ranks quite high for the question ;) )

提交回复
热议问题