Rails: Is it bad to have an irreversible migration?

前端 未结 7 657
隐瞒了意图╮
隐瞒了意图╮ 2020-12-24 10:57

When is it acceptable to raise an ActiveRecord::IrreversibleMigration exception in the self.down method of a migration? When should you take the effort to actually implemen

7条回答
  •  失恋的感觉
    2020-12-24 11:47

    I think another situation when it's ok is when you have a consolidated migration. In that case a "down" doesn't really make sense, as it would drop all the tables (except tables added after the consolidation). That's probably not what you'd want.

提交回复
热议问题