Domanda

When a changeset is marked as failOnError:false, does liquibase record it as having been applied when it fails?

For example, we have a script that performs a pre-emptive drop table in one changeset and then creates the table in the next changeset. When the script is first run, the drop table statement fails as expected and then the table is created successfully. However, the changeset that attempted the drop table is not added to the databasechangelog table.

Is that expected behavior?

È stato utile?

Soluzione

That is the current behavior currently. Depending on the reason for the failure, it can make sense to either continue to retry it or to not.

I created https://liquibase.jira.com/browse/CORE-1766 to add the feature to mark it as failed and not try again.

Currently, your best option would be to add a precondition to the dropTable changeSet with onFail="MARK_RAN"

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top