rake db:rollback
And create the migration with the right column by correcting the column name. If you have lot of data that you don't want to lose then renaming is the way to go.
Generate a new migration file for renaming the old column:
rails g migration RenameOldColumnToNewColumn
Then modify the change method in the generated migration file:rename_column :table_name, :old_column, :new_column
No comments:
Post a Comment