Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Summary

Extension to support the tool pt-online-schema-change from Percona Toolkit. This extension replaces a couple of the default changes to use pt-online-schema-change instead of SQL. This allows to perform a non-locking database upgrade.

Current Version

  • Bump liquibase-core from 4.19.0 to 4.19.1 #302 (@dependabot[bot])

  • Bump docker-maven-plugin from 0.41.0 to 0.42.0 #301 (@dependabot[bot])

  • Bump snakeyaml from 1.33 to 2.0 #300 (@dependabot[bot])

  • Bump spotbugs-maven-plugin from 4.7.3.0 to 4.7.3.2 #299 (@dependabot[bot])

  • Bump maven-compiler-plugin from 3.10.1 to 3.11.0 #298 (@dependabot[bot])

  • Bump tomcat-jdbc from 10.1.5 to 10.1.6 #297 (@dependabot[bot])

  • Bump maven from 3.8.6 to 3.9.0 #290 (@adangel)

  • Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 #289 (@dependabot[bot])

  • Bump maven-invoker-plugin from 3.4.0 to 3.5.0 #288 (@dependabot[bot])

  • Bump percona toolkit from 3.5.0 to 3.5.1 #286 (@adangel)

  • Bump maven-deploy-plugin from 3.0.0 to 3.1.0 #284 (@dependabot[bot])

  • Bump docker-maven-plugin from 0.40.3 to 0.41.0 #283 (@dependabot[bot])

  • Bump maven-enforcer-plugin from 3.1.0 to 3.2.1 #282

    4.1920.1 0 (2023-03-03)

    • Support for Liquibase 4.19.1.

    New Features

    This release of Liquibase Percona extension ships two new features.

    Support for Custom SQL changes

    You can now use Custom SQL changes. The Liquibase Percona extension will automatically detect if it is a ALTER TABLE statement and will execute it using Percona Toolkit's pt-online-schema-change command.

    There are some limitations: Only a single statement is supported. When multiple statements (e.g. separated by ;) are used, then the change is executed as usual. Also, if it is
    not an ALTER TABLE statement, the change is executed as usual without Percona Toolkit. If the statement can't be executed, a warning is logged.

    Note

    Support for Custom SQL changes is enabled by default.
    The Liquibase Percona extension will automatically try to execute Custom SQL changes via the Percona Toolkit. If this is not what you want, either disable the extension for this change globally (e.g. via the system property liquibase.percona.skipChanges=sql) or individually per change via the UsePercona flag. You can also globally disable Percona Toolkit usage with the system property liquibase.percona.defaultOn and enable it for specific changes only. See System Properties.

    Example usage in XML:

    Code Block
    languagexml
    <databaseChangeLog>
      <changeSet id="2" author="Alice">
        <sql>ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL</sql>
      </changeSet>
      <changeSet id="3" author="Alice">
        <sql xmlns:liquibasePercona="http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-percona"
             liquibasePercona:usePercona="false">
            ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL
        </sql>
      </changeSet>
    </databaseChangeLog>

    Example usage in YAML:

    Code Block
    languageyaml
    databaseChangeLog:
    - changeSet:
        id: 2
        author: Alice
        changes:
        - sql:
            splitStatements: true
            sql: |
                ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL;
    - changeSet:
        id: 3
        author: Alice
        changes:
        - sql:
            usePercona: false
            splitStatements: true
            sql: |
                ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL;

    Support for Formatted SQL Changelogs

    You can now use Formatted SQL Changelogs. It also supports the usePercona flag.

    The implementation reuses the support for Custom SQL changes. This means, that the same limitations apply to SQL Changelogs: Multiple statements are not supported. Only ALTER TABLE statements are executed with Percona Toolkit's pt-online-schema-change.

    Note

    Support for SQL Changelogs is enabled by default.

    If you apply a SQL changelog with Liquibase Percona extension, then it will try to execute all changeset with Percona Toolkit if possible. If this is not what you want, you need to make use of the UsePercona flag. You can also globally disable Percona Toolkit usage with the system property liquibase.percona.defaultOn and enable it for specific changes only. See System Properties.

    Example usage:

    Code Block
    languagesql
    --changeset Alice:2
    ALTER TABLE person ADD address VARCHAR(255) NULL;
    
    --changeset Alice:3
    --liquibasePercona:usePercona="false"
    ALTER TABLE person ADD address VARCHAR(255) NULL;

    Implemented enhancements:

    • Support formatted SQL changelogs #287

    • Support usePercona on SQL change type #80

    • Include extension schema properly #294 (@adangel)

    • Add support for Formatted SQL changelogs #292 (@adangel)

    • Add support for SQL change type #291 (@adangel)

    Fixed bugs:

    • Changes with pt-osc are executed multiple times (liquibase 4.19.1) #303

    • Fix percona toolkit download after Percona homepage change #285 (@adangel)

    Dependency updates:

    10)

    • Support for Liquibase 4.20.0.

    Dependency updates:

    Closed issues:

    • Liquibase percona extension (URL) no longer available #275

    Merged pull requests:

    • Refactor PTOnlineSchemaChangeStatement to be a ExecutablePreparedStatement #304 (@adangel)

    • Fix deprecation warning about set-output #295 (@adangel])

    Attachments
    uploadfalse
    oldfalse
    patternsliquibase-percona-4.1920.10.jar

    Author

    Andreas Dangel (andreas.dangel [at] adangel.org)

    Issue Tracking

    https://github.com/liquibase/liquibase-percona/issues

    Source Repository

    https://github.com/liquibase/liquibase-percona.git

    Maven Coordinates

    org.liquibase.ext:liquibase-percona

    Supported Database

    MySQL, MariaDB (since 4.3.2)

    ...

    After extracting the zip file of liquibase, place liquibase-percona-4.1920.10.jar file in the sub directory lib. The shell script liquibase / liquibase.bat will automatically pick this up and the extension is available.

    ...

    Code Block
    languagexml
    <dependency>
        <groupId>org.liquibase.ext</groupId>
        <artifactId>liquibase-percona</artifactId>
        <version>4.1920.1<0</version>
    </dependency>
    

    Docker

    ...

    And just use the latest SNAPSHOT version for liquibase-percona dependency, e.g. 4.1920.21-SNAPSHOT:

    Code Block
    <dependency>
        <groupId>org.liquibase.ext</groupId>
        <artifactId>liquibase-percona</artifactId>
        <version>4.1920.21-SNAPSHOT</version>
    </dependency>
    

    ...

    Old Versions and Release Notes

    March 10, 2023

    4.20.0

    4.20.0 (2023-03-10)

    • Support for Liquibase 4.20.0.

    Dependency updates:

    March 3, 2023

    4.19.1

    4.19.1 (2023-03-03)

    • Support for Liquibase 4.19.1.

    New Features

    This release of Liquibase Percona extension ships two new features.

    Support for Custom SQL changes

    You can now use Custom SQL changes. The Liquibase Percona extension will automatically detect if it is a ALTER TABLE statement and will execute it using Percona Toolkit's pt-online-schema-change command.

    There are some limitations: Only a single statement is supported. When multiple statements (e.g. separated by ;) are used, then the change is executed as usual. Also, if it is
    not an ALTER TABLE statement, the change is executed as usual without Percona Toolkit. If the statement can't be executed, a warning is logged.

    Note

    Support for Custom SQL changes is enabled by default.
    The Liquibase Percona extension will automatically try to execute Custom SQL changes via the Percona Toolkit. If this is not what you want, either disable the extension for this change globally (e.g. via the system property liquibase.percona.skipChanges=sql) or individually per change via the UsePercona flag. You can also globally disable Percona Toolkit usage with the system property liquibase.percona.defaultOn and enable it for specific changes only. See System Properties.

    Example usage in XML:

    Code Block
    languagexml
    <databaseChangeLog>
      <changeSet id="2" author="Alice">
        <sql>ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL</sql>
      </changeSet>
      <changeSet id="3" author="Alice">
        <sql xmlns:liquibasePercona="http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-percona"
             liquibasePercona:usePercona="false">
            ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL
        </sql>
      </changeSet>
    </databaseChangeLog>

    Example usage in YAML:

    Code Block
    languageyaml
    databaseChangeLog:
    - changeSet:
        id: 2
        author: Alice
        changes:
        - sql:
            splitStatements: true
            sql: |
                ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL;
    - changeSet:
        id: 3
        author: Alice
        changes:
        - sql:
            usePercona: false
            splitStatements: true
            sql: |
                ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL;

    Support for Formatted SQL Changelogs

    You can now use Formatted SQL Changelogs. It also supports the usePercona flag.

    The implementation reuses the support for Custom SQL changes. This means, that the same limitations apply to SQL Changelogs: Multiple statements are not supported. Only ALTER TABLE statements are executed with Percona Toolkit's pt-online-schema-change.

    Note

    Support for SQL Changelogs is enabled by default.

    If you apply a SQL changelog with Liquibase Percona extension, then it will try to execute all changeset with Percona Toolkit if possible. If this is not what you want, you need to make use of the UsePercona flag. You can also globally disable Percona Toolkit usage with the system property liquibase.percona.defaultOn and enable it for specific changes only. See System Properties.

    Example usage:

    Code Block
    languagesql
    --changeset Alice:2
    ALTER TABLE person ADD address VARCHAR(255) NULL;
    
    --changeset Alice:3
    --liquibasePercona:usePercona="false"
    ALTER TABLE person ADD address VARCHAR(255) NULL;

    Implemented enhancements:

    • Support formatted SQL changelogs #287

    • Support usePercona on SQL change type #80

    • Include extension schema properly #294 (@adangel)

    • Add support for Formatted SQL changelogs #292 (@adangel)

    • Add support for SQL change type #291 (@adangel)

    Fixed bugs:

    • Changes with pt-osc are executed multiple times (liquibase 4.19.1) #303

    • Fix percona toolkit download after Percona homepage change #285 (@adangel)

    Dependency updates:

    Closed issues:

    • Liquibase percona extension (URL) no longer available #275

    Merged pull requests:

    • Refactor PTOnlineSchemaChangeStatement to be a ExecutablePreparedStatement #304 (@adangel)

    • Fix deprecation warning about set-output #295 (@adangel)

    January 20, 2023

    4.19.0

    4.19.0 (2023-01-20)

    • Support for Liquibase 4.19.0.

    Dependency updates:

    Closed issues:

    • Liquibase percona extension (URL) no longer available #275

    December 9, 2022

    4.18.0

    4.18.0 (2022-12-09)

    • Support for Liquibase 4.18.0.

    Fixed bugs:

    Dependency updates:

    Merged pull requests:

    • [ci] Fix deprecated set-output GitHub Action command #262 (@adangel)

    October 27, 2022

    4.17.1

    4.17.1 (2022-10-27)

    • Support for Liquibase 4.17.1.

    Dependency updates:

    Merged pull requests:

    October 11, 2022

    4.17.0

    4.17.0 (2022-10-11)

    • Support for Liquibase 4.17.0.

    Dependency updates:

    September 13, 2022

    4.16.0

    4.16.0 (2022-09-13)

    • Support for Liquibase 4.16.0.

    Dependency updates:

    Merged pull requests:

    • Remove integration tests for older liquibase versions #244 (@adangel)

    August 23, 2022

    4.15.0

    • Support for Liquibase 4.15.0.

    Dependency updates:

    July 26, 2022

    4.14.0

    • Support for Liquibase 4.14.0.

    Dependency updates:

    July 16, 2022

    4.13.0

    • Support for Liquibase 4.13.0.

    Dependency updates:

    • Bump Percona Toolkit from 3.3.1 to 3.4.0 (4256c16)

    • Bump mariadb-java-client from 2.7.5 to 2.7.6 (aae6892)

    • Bump exec-maven-plugin from 3.0.0 to 3.1.0 #224 (@dependabot[bot])

    • Bump liquibase-core from 4.12.0 to 4.13.0 #223 (@dependabot[bot])

    • Bump spotbugs-maven-plugin from 4.7.0.0 to 4.7.1.0 #222 (@dependabot[bot])

    • Bump mariadb-java-client from 3.0.5 to 3.0.6 #221 (@dependabot[bot])

    June 23, 2022

    4.12.0

    • Support for Liquibase 4.12.0.

    Implemented enhancements:

    Dependency updates:

    May 27, 2022

    4.11.0

    • Support for Liquibase 4.11.0

    Dependency updates:

    • Bump tomcat-jdbc from 10.0.20 to 10.0.21 #207 (@dependabot[bot])

    • Bump spotbugs-maven-plugin from 4.6.0.0 to 4.7.0.0 #208 (@dependabot[bot])

    • Bump liquibase-core from 4.10.0 to 4.11.0 #209 (@dependabot[bot])

    • Bump mariadb-java-client from 3.0.4 to 3.0.5 #210 (@dependabot[bot])

    May 6, 2022

    4.10.0

    • Support for Liquibase 4.10.0

    Implemented enhancements:

    • Use github_changelog_generator #205 (@adangel)

    Dependency updates:

    • Bump liquibase-core from 4.9.1 to 4.10.0 #204 (@dependabot[bot])

    • Bump mysql-connector-java from 8.0.28 to 8.0.29 #203 (@dependabot[bot])

    • Bump nexus-staging-maven-plugin from 1.6.12 to 1.6.13 #202 (@dependabot[bot])

    • Bump maven-javadoc-plugin from 3.3.2 to 3.4.0 #201 (@dependabot[bot])

    • Bump tomcat-jdbc from 10.0.18 to 10.0.20 #200 (@dependabot[bot])

    March 31, 2022

    4.9.1

    March 18, 2022

    4.9.0

    • Support for Liquibase 4.9.0.

    February 24, 2022

    4.8.0

    • Support for Liquibase 4.8.0.

    • PR #182: Added masking for slave password - andreiMambu

    • #183: The parameter --slave-password is not masked in logs

    January 27, 2022

    4.7.1

    • Support for Liquibase 4.7.1.

    January 13, 2022

    4.7.0

    • Support for Liquibase 4.7.0.

    December 02, 2021

    4.6.2

    • Support for Liquibase 4.6.2.

    November 19, 2021

    4.6.1.1

    • #148: Support createIndex with specifying index prefix length

    November 06, 2021

    4.6.1

    • Support for Liquibase 4.6.1.

    October 04, 2021

    4.5.0

    • Support for Liquibase 4.5.0.

    August 12, 2021

    4.4.3

    • Support for Liquibase 4.4.3.

    July 23, 2021

    4.4.2

    • Support for Liquibase 4.4.2.

    July 18, 2021

    4.4.1

    • Support for Liquibase 4.4.1.

    • #122: Add docker image with liquibase, liquibase-percona and percona toolkit

    June 20, 2021

    4.4.0

    • Support for Liquibase 4.4.0.

    • PR #112: Fixing typos - Jasper Vandemalle

    • #106: MySQL connection times out after pt-online-schema-change run

    • #118: Use catalogName instead of schemaName

    May 24, 2021

    4.3.5

    • Support for Liquibase 4.3.5.

    April 28, 2021

    4.3.4

    • Support for Liquibase 4.3.4.

    April 23, 2021

    4.3.3

    • Support for Liquibase 4.3.3.

    March 26, 2021

    4.3.2

    • #60: Add support for MariaDB JConnector

    • #85: liquibase-percona 4.3.1 is not reproducible anymore

    • #88: Support for Liquibase 4.3.2

    February 23, 2021

    4.3.1

    • The maven coordinates have changed. This extension is now available like the other liquibase extensions in the group org.liquibase.ext.
      In order to add this extension, use the following snippet:

      Code Block
      languagexml
      <dependency>
          <groupId>org.liquibase.ext</groupId>
          <artifactId>liquibase-percona</artifactId>
          <version>4.3.1</version>
      </dependency>
    • #66: Change maven coordinates to be org.liquibase.ext

    • #74: Update Liquibase to 4.3.0

    • Support for Liquibase 4.3.1

    • Alignment with existing release process

    February 04, 2021

    2.0.0

    January 28, 2021

    1.7.1

    • Fixed #58: Update versions (liquibase, percona-toolkit, mysql)

    July 04, 2020

    1.7.0

    • Fixed #35: Add support for AddPrimaryKeyChange

    • Fixed #37: Using quotes for liquibase.percona.options doesn't always work

    • Fixed #53: Update to support latest liquibase 3.10.1

    • Fixed #54: Update mysql-connector-java to 8.0.20

    • Fixed #55: Update percona toolkit to 3.2.0

    April 20, 2019

    1.6.0

    The minimum Java runtime version is now Java 1.7.

    The system property liquibase.percona.options uses now a default value of --alter-foreign-keys-method=auto --nocheck-unique-key-change. These two options are not added by default anymore when pt-osc is executed. They are added now via the additional options system property. In case you have overridden this system property, make sure, to add these options as well, if you need them.

    • Fixed #29: Allow to override --nocheck-unique-key-changes and --alter-foreign-keys-method=auto

    • Fixed #30: Update liquibase

    April 14, 2019

    1.5.2

    • Fixed #28: Strange behavior when liquibase.percona.defaultOn is false

    November 10, 2018

    1.5.1

    September 30, 2018

    1.5.0

    pt-online-schema-change is executed now with the option --nocheck-unique-key-change. This enables to add unique indexes, but can cause data loss, since duplicated rows are ignored. See Percona Toolkit Documentation for more information.

    The plugin is only compatible with version 3.0.12 or later of Percona Toolkit.

    • Upgraded liquibase to 3.5.5

    • Verified compatibility to liquibase 3.6.2

    • Fixed #14: Rollback of foreign key constraint changing constraint names problem

    • Fixed #15: Unique key constraint cannot be added

    • Fixed #20: Support "UsePercona flag" in XML changelogs

    • Fixed #22: Cross database bug

    September 27, 2018

    1.4.1

    • Fixed #16: Failing test PerconaAddForeignKeyConstraintChangeTest

    • Fixed #17: Include Percona Toolkit into integration test

    • Fixed #18: Use spotbugs instead of findbugs

    • Fixed #19: Upgrade liquibase to 3.5.4

    • Fixed #21: Couldn't determine password: JdbcConnection is unsupported: dbcp.PoolingDataSource$PoolGuardConnectionWrapper

    • Fixed #23: Add support for dbcp2

    • Added new system property liquibase.percona.path to specify the path where Percona Toolkit is installed.

    July 21, 2017

    1.4.0

    • Fixed #13: Use default liquibase.properties as fallback

    July 21, 2017

    1.3.1

    • Fixed #12: Cannot run migrations with the percona extension on a Spring Boot app with embedded Tomcat

    December 18, 2016

    1.3.0

    • Upgraded liquibase to 3.5.3

    • Support for MySQL Connector 6.0.x in addition to 5.1.x.

    • Fixed #7: Foreign key constraints of AddColumn is ignored

    • Fixed #8: Support addForeignKeyConstraintChange, addUniqueConstraintChange

    • Fixed #9: Support for enabling pt-online-schema-changes on a per-change basis

    • Fixed #10: Build fails with java7: UnsupportedClassVersion when running DatabaseConnectionUtilTest.testGetPasswordMySQL_6

    September 13, 2016

    1.2.1

    • PR #4: Allow passing additional command line options to pt-online-schema-change

    • PR #5: Support afterColum attribute

    April 2, 2016

    1.2.0

    • Fixed #2: Adding indexes via pt-online-schema-change

    • Fixed #3: Altering column data types via pt-online-schema-change

    • Added configuration property "liquibase.percona.skipChanges"

    • Upgraded liquibase to 3.4.2

    July 26, 2015

    1.1.1

    • Fixed #1: Tables with foreign keys

    November 6, 2014

    1.1.0

    • compatible with liquibase 3.3.0

    October 19, 2014

    1.0.0

    • compatible with liquibase 3.2.x