...
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;
|
...
- Create the class in a sub-package of "liquibase.precondition.ext". LiquiBase Liquibase automatically registers Preconditions it finds in that package
- Call liquibase.precondition.PreconditionFactory.getInstance().register(yourPrecondition)
...