liquibase.exception.MigrationFailedException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • After upgrading from liquibase version 2.0.5 to 3.3.2 indexExists precondition stopped working for Derby databases using case insensitive mode. I've also tried other versions between 2.0.5 and 3.3.2 but it seems to be broken in all versions above 2.0.5. The error message I get is below: {noformat} liquibase.exception.MigrationFailedException: Migration failed for change set resources/liquibase/initialSchema/schema.xml::createIndex::dzmitry: Reason: resources/liquibase/liquibase.db.changelog.xml : Index Exists Precondition: Transaction_recordId : Comparisons between 'VARCHAR (UCS_BASIC)' and 'CHAR (TERRITORY_BASED:SECONDARY)' are not supported. Types must be comparable. String types must also have matching collation. If collation does not match, a possible solution is to cast operands to force them to the default collation (e.g. SELECT tablename FROM sys.systables WHERE CAST(tablename AS VARCHAR(128)) = 'T1') at liquibase.changelog.ChangeSet.execute(ChangeSet.java:514) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.Liquibase.update(Liquibase.java:181) ............................. at java.lang.Thread.run(Thread.java:745) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.IndexExistsPrecondition.check(IndexExistsPrecondition.java:121) at liquibase.precondition.core.OrPrecondition.check(OrPrecondition.java:43) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:38) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:43) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:201) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:471) ... 9 more {noformat}
    via by Dzmitry Kazimirchyk,
  • After upgrading from liquibase version 2.0.5 to 3.3.2 indexExists precondition stopped working for Derby databases using case insensitive mode. I've also tried other versions between 2.0.5 and 3.3.2 but it seems to be broken in all versions above 2.0.5. The error message I get is below: {noformat} liquibase.exception.MigrationFailedException: Migration failed for change set resources/liquibase/initialSchema/schema.xml::createIndex::dzmitry: Reason: resources/liquibase/liquibase.db.changelog.xml : Index Exists Precondition: Transaction_recordId : Comparisons between 'VARCHAR (UCS_BASIC)' and 'CHAR (TERRITORY_BASED:SECONDARY)' are not supported. Types must be comparable. String types must also have matching collation. If collation does not match, a possible solution is to cast operands to force them to the default collation (e.g. SELECT tablename FROM sys.systables WHERE CAST(tablename AS VARCHAR(128)) = 'T1') at liquibase.changelog.ChangeSet.execute(ChangeSet.java:514) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.Liquibase.update(Liquibase.java:181) ............................. at java.lang.Thread.run(Thread.java:745) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.IndexExistsPrecondition.check(IndexExistsPrecondition.java:121) at liquibase.precondition.core.OrPrecondition.check(OrPrecondition.java:43) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:38) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:43) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:201) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:471) ... 9 more {noformat}
    via by Dzmitry Kazimirchyk,
    • liquibase.exception.MigrationFailedException: Migration failed for change set resources/liquibase/initialSchema/schema.xml::createIndex::dzmitry: Reason: resources/liquibase/liquibase.db.changelog.xml : Index Exists Precondition: Transaction_recordId : Comparisons between 'VARCHAR (UCS_BASIC)' and 'CHAR (TERRITORY_BASED:SECONDARY)' are not supported. Types must be comparable. String types must also have matching collation. If collation does not match, a possible solution is to cast operands to force them to the default collation (e.g. SELECT tablename FROM sys.systables WHERE CAST(tablename AS VARCHAR(128)) = 'T1') at liquibase.changelog.ChangeSet.execute(ChangeSet.java:514) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.Liquibase.update(Liquibase.java:181)

    Users with the same issue

    Malcshour
    1 times, last one,