Let's say I have done this:
rails generate model User name:string email: string
and also have done this:
bundle exec rake db:migrate
and now I decide to add a third field like address to the User model. How should I do that?
You can do this:
rails g migration AddAddressToUser address:string
rake db:migrate
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