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

addAutoIncrement

Not Supported

addCheckConstraint

Supported

Drop check constraint

addColumn

Supported

Drop column

addDefaultValue

Supported

Drop default value

addForeignKeyConstraint

Supported

Drop foreign key constraint

addLookupTable

Supported

Drop foreign key constraint and drop table

addNotNullConstraint

Supported

Drop not null constraint

addPrimaryKey

Supported

Drop primary key

addUniqueConstraint

Supported

Drop unique constraint

alterSequence

Not Supported

createFunction

Not Supported

createIndex

Supported

Drop index

createPackage

Not Supported

createPackageBody

Not Supported

createProcedure

Not Supported

createSequence

Supported

Drop sequence

createSynonym

Supported

Drop synonym

createTable

Supported

Drop table

createTrigger

Not Supported

createView

Supported

Drop view

customChange

Not Supported

delete

Not Supported

disableCheckConstraint

Supported

Enable check constraint

disableTrigger

Supported

Enable trigger

dropAllForeignKeyConstraints

Not Supported

dropCheckConstraint

Not Supported

dropColumn

Not Supported

dropDefaultValue

Not Supported

dropForeignKeyConstraint

Not Supported

dropFunction

Not Supported

dropIndex

Not Supported

dropNotNullConstraint

Supported

Add not null constraint

dropPackage

Not Supported

dropPackageBody

Not Supported

dropPrimaryKey

Not Supported

dropProcedure

Not Supported

dropSequence

Not Supported

dropSynonym

Not Supported

dropTable

Not Supported

dropTrigger

Not Supported

dropUniqueConstraint

Not Supported

dropView

Not Supported

enableCheckConstraint

Supported

Disable check constraint

enableTrigger

Supported

Disable trigger

executeCommand

Not Supported

insert

Not Supported

loadData

Not Supported

loadUpdateData

Not Supported

markUnused

Not Supported

mergeColumns

Not Supported

modifyDataType

Not Supported

output

Supported

Return empty change

renameColumn

Supported

Rename with

oldColumnName

renameSequence

Supported

Rename with

oldSequenceName

renameTable

Supported

Rename with

oldTableName

renameTrigger

Supported

Rename with

oldTriggerName

.

renameView

Supported

Rename with

oldViewName

setColumnRemarks

Not Supported

setTableRemarks

Not Supported

sql

Not Supported

sqlFile

Not Supported

stop

Not Supported

tagDatabase

Supported

Deletes the tag

update

Not Supported