You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see anything documented so I hope I'm not missing something obvious.
When our migrations fail for any reason we end up with something like:
Dirty database version 4. Fix and force version.
But Postgres supports transactional DDL. All changes that happen inside transactional DDL are rolled back with the transaction. So, where migrations are executed in a transaction, there should never be any reason to mark it as dirty.
So what would be really neat would be for migrate to have an option with Postgres DBs to take control of the migration's transaction control such that it knows never to mark anything as dirty. Either the migration script runs successfully and it commits, or it is unsuccessful and it rollsback.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I don't see anything documented so I hope I'm not missing something obvious.
When our migrations fail for any reason we end up with something like:
But Postgres supports transactional DDL. All changes that happen inside transactional DDL are rolled back with the transaction. So, where migrations are executed in a transaction, there should never be any reason to mark it as dirty.
So what would be really neat would be for
migrate
to have an option with Postgres DBs to take control of the migration's transaction control such that it knows never to mark anything as dirty. Either the migration script runs successfully and it commits, or it is unsuccessful and it rollsback.Beta Was this translation helpful? Give feedback.
All reactions