gomigrate
gomigrate copied to clipboard
Support for Atomic migrations
Would it be possible to add an option to make migrations atomic? While developing my migration I sometimes make mistakes, and when this happens the DB fails part way through leaving the schema/data in an inconsistent state. It would be really helpful if we could rollback a migration if it fails in the middle.
We already perform migrations within a transaction, so for DBs that support transactional DDL changes (Postgres), migrations are already atomic. I'm assuming you need that feature for a different DB?
Yeah, I'm using mysql.