What change types can I use auto rollback with?
Liquibase can automatically generate rollback SQL for many Change Types, such as createTable, addColumn, and renameColumn, so you can simply run the rollback command to revert those changes. However, for Change types like dropTable, insert, or any formatted SQL changeset, Liquibase cannot auto-generate rollback logic because the previous database state may be unclear or complex. In those cases, you must define custom rollback statements in your changelog. You can also override auto-generated rollbacks if you prefer full control. You can use automatic rollback with XML, JSON, and YAML changelogs for any Change type marked as “Supported” in the following table.
Change Type | Supported | Behavior |
Not Supported | ||
Supported | Drop check constraint | |
Supported | Drop column | |
Supported | Drop default value | |
Supported | Drop foreign key constraint | |
Supported | Drop foreign key constraint and drop table | |
Supported | Drop not null constraint | |
Supported | Drop primary key | |
Supported | Drop unique constraint | |
Not Supported | ||
Not Supported | ||
Supported | Drop index | |
Not Supported | ||
Not Supported | ||
Not Supported | ||
Supported | Drop sequence | |
Supported | Drop synonym | |
Supported | Drop table | |
Not Supported | ||
Supported | Drop view | |
Not Supported | ||
Not Supported | ||
Supported | Enable check constraint | |
Supported | Enable trigger | |
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Supported | Add not null constraint | |
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Supported | Disable check constraint | |
Supported | Disable trigger | |
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Supported | Return empty change | |
Supported | Rename with
| |
Supported | Rename with
| |
Supported | Rename with
| |
Supported | Rename with
. | |
Supported | Rename with
| |
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Not Supported | ||
Supported | Deletes the tag | |
Not Supported |