Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Custom parsers must implement liquibase.precondition.Precondition, which includes the following methods:

Code Block

public String getName();

Return the name used in XML and other changelogs to refer to the precondition.

Code Block

public void check(Database database, DatabaseChangeLog changeLog) throws PreconditionFailedException, PreconditionErrorException;

...

  1. Create the class in a sub-package of "liquibase.precondition.ext".  LiquiBase Liquibase automatically registers Preconditions it finds in that package
  2. Call liquibase.precondition.PreconditionFactory.getInstance().register(yourPrecondition)

...