Comments
3 comments
-
Hello santana,
Great question, thank you. This is almost certainly due to your migration being handled in a transaction and due the failure automatically being rolled back. This functionality in flyway is db dependant, SQL Server and Postgres do it automatically.
I've mocked up a quick example here, including a info call afterwards so you can see how flyway views the migration status after the event.
Were it either on a db incapable of rolling back, or for some other reason be unable to roll back, instead of showing as pending due to effectively never happening, it would have a status of failed. -
Thanks for taking time. Yes, this is the desired behavior. But my question is more related to flyway table. Failed migration recorded on flyway table its not bean shown. I should have state as not successfull save on record on failed migration. But im not having this.
-
This is due to the rollback, as the change was undone. Whereas a failure migration implies that the db needs some corrective action, which is not the case.
I appreciate this might not align with your expectations, it's a nuance in the different between success / failure of the tool running and success / failure of the code being deployed.
Essentially you're looking for some proof that your intervention is required, which presently doesn't exist, or a historical record of events?
Add comment
Please sign in to leave a comment.
Any ideas why?