laravel migration re-organising column order

后端 未结 4 896
再見小時候
再見小時候 2021-02-01 13:23

When you create a new column in a table you can use the ->after(\'column name\') to dictate where it goes. How can I create a migration that re-orders the columns in the right o

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 13:40

    I would suggest a DB::query('.. raw sql query ..'); and use the query from the answer "How to move columns in a MySQL table?"

提交回复
热议问题