Monkeypatch for easier to read migrations


/ Published in: Rails
Save to your folder(s)

I never can remember the exact name of the exception to call in self.down for a migration that cannot be undone. So I decided to come up with something easier to remember. This feels more "ruby-ish" and "rails-ish" to me, and so far it works just fine. It also displays a message that is easier to pick out amongst all the other migration output on the screen so you can see at a glance that it failed.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.