Avoid using change_table in migration

Ever tried to rollback a migration from a legacy project only to find the following error popup?

==  AddGlobalNotificationSupport: reverting ===================================
rake aborted!
An error has occurred, this and all later migrations canceled:

rb:42:in `block in inverse'

Thats right. ActiveRecord says its an IrreversibleMigration.


Turns out using change_table as part of your migration is not a good idea. If you’re using something like that, you should consider changing into a more manual approach like add_column, remove_column.

Reference: Stackoverflow