• Task
  • Version ยท 6.0
  • Create

Implement a rollback strategy with SQL changelogs

Last updated: October 19, 2026

Destructive operations

Before you begin

Procedure

1

Start your changelog with the formatted SQL header

--liquibase formatted sql

--changeset your_name:unique_id
2

Add rollback statements to your SQL changesets

Single rollback statement example

loading

Multiple rollback statements example

loading

Using external rollback files

loading
3

Test your rollback strategy

1. Tag the current state

2. Apply the changeset

3. Preview what rollback would do

4. Execute the rollback

5. Verify the rollback