Liquibase® version 3.8.5 is now available! Get it for free.
2018 XML Announcement
News All Previous Posts >>

Subscribe for email updates

- and/or -

Change: ‘customChange’

Although Liquibase tries to provide a wide range of database refactorings, there are times you may want to create your own custom refactoring class.

To create your own custom refactoring, simply create a class that implements the liquibase.change.custom.CustomSqlChange or liquibase.change.custom.CustomTaskChange interface <customChange> tag in your change set.

If your change can be rolled back, implement the liquibase.change.custom.CustomSqlRollback interface as well.

For a sample custom change class, see liquibase.change.custom.ExampleCustomSqlChange in the test folder

Available Attributes

NameDescription
<changeSet author="liquibase-docs" id="customChange-example">
    <customChange class="com.example.CustomChange"/>
</changeSet>
changeSet:
  id: customChange-example
  author: liquibase-docs
  changes:
  - customChange:
      class: com.example.CustomChange
{
  "changeSet": {
    "id": "customChange-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "customChange": {
          "class": "com.example.CustomChange"
        }
      }]
    
  }
}

Database Support

DatabaseNotesAuto Rollback
DB2/LUWSupportedNo
DB2/zSupportedNo
DerbySupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
INGRESSupportedNo
InformixSupportedNo
MariaDBSupportedNo
MySQLSupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteSupportedNo
SybaseSupportedNo
Sybase AnywhereSupportedNo