Just wondering what the best way is to add new columns via a migration in yii2. The documentation seems to imply when adding additional columns you should do them one per migration, well at least in the example.
Yii2 Migration - Add Column. Is this the case, or is it OK to add multiple ADDITIONAL columns in a single migration? If so would you use a specific migration naming convention like add_xxx_and_zzz_column_to_yyy_table
. Cheers!
It isn't clear from the docs but you can create multiple columns in one migration:
yii migrate/create add_xxx_column_yyy_column_to_zzz_table --fields="xxx:integer,yyy:text"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With