Support running pending transactions in a single transaction
Feature request
Optionally migratus should support running the pending transactions in a single transaction. Supporting this feature could support multiple use cases.
Releasing breaking changes.
If a version includes multiple migrations compared to the previous version if one of the migrations fails, then rolling back the entire set of migrations could get the DB state back to the previously supported state and the previous version of the application could be started without any manual intervention.
Supporting repeatable migrations
We are using DB features heavily in our application and reviewing large up and down migrations is an error-prone and tedious job. We added preliminary support for repeatable migrations to our migratus integration, but if a repeatable migration depends on a schema change, executing them in separate transactions could break them.
Other tools
Flyway supports grouping pending transactions and executing them in a single transaction.
https://documentation.red-gate.com/fd/migration-transaction-handling-273973399.html