Rollbacks for State-based deployments

FLYWAY ENTERPRISE

There are a few options to generate a rollback script when doing State-based deployments.

  1. Use flyway prepare and reverse the source and target to generate a script and save this as your rollback script.

  2. Use flyway snapshot to take a snapshot of your target database before deploying to it.  You can then use SQL Compare Pro (GUI or CLI) with the snapshot as your source to see the changes and generate a script to roll the changes back. 


Note: Be careful when using these comparison based methods for rolling back changes especially if transactional data is involved.  It might be better to fix forward and have a fix flow through your existing deployment process.


Didn't find what you were looking for?