Can I pass default value to rails generate migration?

You can’t: https://guides.rubyonrails.org/active_record_migrations.html#column-modifiers

null and default cannot be specified via command line.

The only solution is to modify the migration after it’s generated. It was the case in Rails 3, still the case in Rails 7

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)