01: package liquibase.change.custom;
02:
03: import liquibase.database.Database;
04: import liquibase.database.sql.SqlStatement;
05: import liquibase.exception.CustomChangeException;
06: import liquibase.exception.RollbackImpossibleException;
07: import liquibase.exception.UnsupportedChangeException;
08:
09: /**
10: * Interface to implement that allows rollback of a custom sql change.
11: *
12: * @see liquibase.change.custom.CustomSqlChange
13: */
14: public interface CustomSqlRollback {
15:
16: /**
17: * Generates the SQL statements required to roll back the change
18: *
19: * @param database the target {@link liquibase.database.Database} associated to this change's rollback statements
20: * @return an array of {@link SqlStatement}s with the rollback statements
21: * @throws liquibase.exception.CustomChangeException if an exception occurs while processing this rollback
22: * @throws liquibase.exception.UnsupportedChangeException if this change is not supported by the {@link liquibase.database.Database} passed as argument
23: * @throws liquibase.exception.RollbackImpossibleException if rollback is not supported for this change
24: */
25: public SqlStatement[] generateRollbackStatements(Database database)
26: throws CustomChangeException, UnsupportedChangeException,
27: RollbackImpossibleException;
28:
29: }
|