In Rails 2, will removing a column with a Rails migration also change/remove indexes associated with the column? If not, and instead you have to also change/remove each ind
Just as a caution, while Rails 4 will remove the index for you if you remove the column, you should specify the column type. Without a column type, running rake db:rollback
will return
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
remove_column is only reversible if given a type.
I was experimenting with dropping foreign key columns that were indexed. Even specifying index: true
in the change block didn't seem to make the columns reversible on rollback.