Rollback support
See original GitHub issueIt would be great to have a rollback feature so that the schema can be rolled back to a specific migration. The functionality could be similar to EF migrations rollback.
Here’s the intended functionality:
Assume there are 4 migration scripts 1.1
, 1.2
, 1.3
, 1.4
When migrate command is executed with a specific version e.g. 1.3
all migrations greater than that (1.4
) will be rolled back by executing the corresponding rollback script. This means, in addition to the migrations directory, users need to provide a rollback directory with the rollback scripts (Similar to Up()
and Down()
methods in EF).
This functionality will be similar to EF Update-Database
command.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Rollback (data management)
In SQL, ROLLBACK is a command that causes all data changes since the last START TRANSACTION or BEGIN to be discarded by the...
Read more >Rollback as an Agile Strategy
Rollback as an Agile Strategy ... Rollback is downgrading the current version of a software component to the previous one. This usually happens ......
Read more >ROLLBACK TRANSACTION (Transact-SQL) - SQL Server
You can use ROLLBACK TRANSACTION to erase all data modifications made from the start of the transaction or to a savepoint.
Read more >[WP Rollback] Support | WordPress.org
Topic; Voices; Replies; Last Post. Rollback not sticking? Started by: aricvanselous. 2; 1; 2 weeks, 2 days ago · Matt Cromwell.
Read more >Liquibase Rollback Workflow
Note: Rollback support is available in command line, Ant, and Maven. ... There are several ways to revert your changes with the rollback-to-date...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @lecaillon
The use case is actually to get the db back to a stable state after a faulty migration. E.g. migration
1.4
broke something (although got successfully applied) so need to revert back to1.3
. I guess this could be achieved by rolling forward i.e. deploying a new1.5
script to revert the changes in1.4
but having a rollback feature would make it convenient for CI/CD. The steps would beWe found DB migration rollbacks is problematic (although it sounds a nice feature). We ended up with