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