01: package liquibase.change.custom;
02:
03: import liquibase.database.Database;
04: import liquibase.exception.CustomChangeException;
05: import liquibase.exception.UnsupportedChangeException;
06:
07: /**
08: * Interface to implement when creating a custom change that does not actually generate SQL.
09: * If you are updating a database through SQL, implementing CustomSqlChange is preferred because the SQL can either be executed
10: * directly or saved to a text file for later use depending on the migration mode used.
11: * To allow the change to be rolled back, also implement the CustomTaskRollback interface.
12: * If your change requires sql-based logic and non-sql-based logic, it is best to create a change set that contains a mix of CustomSqlChange and CustomTaskChange calls.
13: *
14: * @see liquibase.change.custom.CustomTaskRollback
15: * @see liquibase.change.custom.CustomSqlChange
16: */
17: public interface CustomTaskChange extends CustomChange {
18:
19: /**
20: * Method called to run the change logic.
21: * @param database
22: * @throws liquibase.exception.CustomChangeException an exception occurs while processing this change
23: * @throws liquibase.exception.UnsupportedChangeException if this change is not supported by the {@link liquibase.database.Database} passed as argument
24: */
25: public void execute(Database database)
26: throws CustomChangeException, UnsupportedChangeException;
27: }
|