Laravel 5.2 how to update migration without losing data

前端 未结 4 1627
天涯浪人
天涯浪人 2021-01-30 13:27

I\'m using laravel 5.2 and I usually update my database according to project requirements, so I\'d like to do it without losing database records. I don\'t mean how to seed my da

4条回答
  •  感情败类
    2021-01-30 13:59

    Please note that when you add a new column for a table while already there are data, you have to set a default value for new column or make it nullable type.. otherwise you will endup with error

提交回复
热议问题