auto-reorg

The auto-reorg global parameter is a Boolean that determines whether Liquibase automatically reorganizes table objects stored on disk when you modify a DB2 database. The default value is true.

Uses

When you modify a table in your database, its indexes and data may not be stored in adjacent locations stored on disk, which wastes space.

To compact these table objects and eliminate fragmented data, DB2 databases require you to use the REORG TABLE command after you run statements like DROP COLUMN. By default, Liquibase adds all necessary REORG TABLE statements automatically.

If you want to handle database reorganization manually, or if you use an automated process that reorganizes your database separately from Liquibase, you can set auto-reorg to false.

Syntax

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file (defaults file)
liquibase.autoReorg: <true|false>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: update
        globalArgs: { auto-reorg: "<true|false>" }
Global CLI parameter
liquibase
 --auto-reorg=<true|false> update
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.autoReorg=<true|false>
Liquibase Environment Variables
LIQUIBASE_AUTO_REORG=<true|false>

For more information, see Working with Command Parameters.

Related links