Feature suggestion

I am migrating my project database to Liquibase.
There are several versions in production already .
Unfortunately there is no “version” mark in the database.

So I am creating a changelog like this:

               

When the changelog is executed the changeset will be marked as executed,
regardless of whether it was actually executed or not. This not convinient for database state analysis.
I’d like to follow the rule “changelog table contains records only about actually executed changesets”

So I suggest to introduce additional onFail action “SKIP” which is handled by Liquibase in the following way:

  1. the changeset record in changelog table gets some mark that changeset was not executed due to precondition failure
  2. During next database updates the Liquibase consider the changeset as executed (e.g. do not evaluate the precondition and do not execute the changeset).

The second item is important for checking whether the database state is up to date or not.
If onFail=“CONTINIE” is used then Liquibase indicates all such changesets as “need to be executed” for an up to date database.
But I’d like to get “zero chagesets need to be executed” for an up to date database.

That is a good useage of the precondition mark_ran attribute.  That is what it is designed for. 

An additional column on the databasechangelog table showing if it was marked ran based on a failed precondition is a good idea.  I added it as a feature in jira.  http://liquibase.jira.com/browse/CORE-431

Nathan

There is an existing MARK_RAN onFail attribute for preconditions that may be what you are looking for, too.

Nathan