another migration is already named add_fields_to...

So I wanted to add some new columns to a table for which I did rails generate migration AddFieldsToTutorialRequests duration:integer rate: integer but i would like to add more columns so I've tried redoing rails generate migration AddFieldsToTutorialRequests location:string notes: text but then of course there was the command response of another migration is already named add_fields_to... So I've retried with rails generate migration AddFactorsToTutorialRequests location:string notes: text It worked this time. It looks like this is ok from reading http://guides.rubyonrails.org/migrations.html Is this ok?

Posted about 5 years ago by Harry Lee
Posted about 5 years ago by Alex Yang

Yes, to add fields you can name your migration anything you like, as long as it's in the form AddXToY or add_x_to_y.

0