how can I create a migration to add a value to an enum in eloquent

后端 未结 5 1572
后悔当初
后悔当初 2020-12-28 14:46

I have a table that contains an enum field

CREATE TABLE `user_status` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `values` enum(\'on\', \'off\'),
           


        
5条回答
  •  无人及你
    2020-12-28 14:56

    I had a slightly different situation, it was necessary to add new items, change existing and remove old. This is my example.

     

    By the way, generate row SQL query via JetBrains ide(DataGrip), is like that:

     ∧_∧ 
    (。・ω・。)つ━☆・*。
    ⊂   ノ    ・゜+.
     しーJ   °。+ *´¨)
    

提交回复
热议问题