liquibase.exception.DatabaseException

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.

  • If a user is upgrading from a Stash 2.4 Beta to the official release, it can fail with: {noformat} 2013-05-07 16:38:30,539 INFO [localhost-startStop-1] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /home/www/data/stash/instance for 158926@STASHSERVER 2013-05-07 16:38:34,276 ERROR [localhost-startStop-1] liquibase Change Set liquibase/r2_4/upgrade.xml::STASHDEV-3734-4::mstudman failed. Error: Error executing SQL ALTER TABLE `stash`.`stash_user` ADD CONSTRAINT `uq_stash_user_slug` UNIQUE (`slug`): Specified key was too long; max key length is 767 bytes liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE `stash`.`stash_user` ADD CONSTRAINT `uq_stash_user_slug` UNIQUE (`slug`): Specified key was too long; max key length is 767 bytes at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) ~[liquibase-core-2.0.5.jar:na] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) ~[liquibase-core-2.0.5.jar:na] at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) ~[liquibase-core-2.0.5.jar:na] at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) ~[liquibase-core-2.0.5.jar:na] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) ~[liquibase-core-2.0.5.jar:na] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) [liquibase-core-2.0.5.jar:na] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) [liquibase-core-2.0.5.jar:na] at liquibase.Liquibase.update(Liquibase.java:114) [liquibase-core-2.0.5.jar:na] {noformat} due to schema changes between the two releases. This should be better handled by providing an upgrade path from Beta to a stable release. This would be helpful for those who'd like to try out the Beta before the actual release and then upgrade to the official version.
    via by Gurleen Anand [Atlassian],
  • If a user is upgrading from a Stash 2.4 Beta to the official release, it can fail with: {noformat} 2013-05-07 16:38:30,539 INFO [localhost-startStop-1] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /home/www/data/stash/instance for 158926@STASHSERVER 2013-05-07 16:38:34,276 ERROR [localhost-startStop-1] liquibase Change Set liquibase/r2_4/upgrade.xml::STASHDEV-3734-4::mstudman failed. Error: Error executing SQL ALTER TABLE `stash`.`stash_user` ADD CONSTRAINT `uq_stash_user_slug` UNIQUE (`slug`): Specified key was too long; max key length is 767 bytes liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE `stash`.`stash_user` ADD CONSTRAINT `uq_stash_user_slug` UNIQUE (`slug`): Specified key was too long; max key length is 767 bytes at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) ~[liquibase-core-2.0.5.jar:na] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) ~[liquibase-core-2.0.5.jar:na] at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) ~[liquibase-core-2.0.5.jar:na] at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) ~[liquibase-core-2.0.5.jar:na] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) ~[liquibase-core-2.0.5.jar:na] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) [liquibase-core-2.0.5.jar:na] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) [liquibase-core-2.0.5.jar:na] at liquibase.Liquibase.update(Liquibase.java:114) [liquibase-core-2.0.5.jar:na] {noformat} due to schema changes between the two releases. This should be better handled by providing an upgrade path from Beta to a stable release. This would be helpful for those who'd like to try out the Beta before the actual release and then upgrade to the official version.
    via by Gurleen Anand [Atlassian],
  • Unable to update 1.0.3 db?
    via GitHub by ojhunt
    ,
  • I have a Liquibase 2.x style change set with the following configuration: {code} <renameColumn tableName="my_table" oldColumnName="my_column_old" newColumnName="my_column_new" columnDataType="text"/> {code} This change set worked properly against MySQL using Liquibase 2.x. Running this change set against a MySQL database using Liquibase 3.x, I encounter the following error: {code} [INFO] ChangeSet schema/my.changelog.xml::my-changeset::jduke ran successfully in 32ms [ERROR] Change Set my.changelog.xml::my-changeset::jduke failed. Error: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'clob' at line 1 liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE my_database.my_table CHANGE my_column_old my_column_new clob: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'clob' at line 1 at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1341) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1325) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:343) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:135) {code} It seems that Liquibase is incorrectly mapping the 'text' data type to 'clob', when it should be using 'text' for MySQL, as it did in 2.x. I have verified I am using a MySQLDatabase object. Is this a bug, or am I missing something?
    via by Jason Duke,
    • liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE `stash`.`stash_user` ADD CONSTRAINT `uq_stash_user_slug` UNIQUE (`slug`): Specified key was too long; max key length is 767 bytes at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)[liquibase-core-2.0.5.jar:na] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)[liquibase-core-2.0.5.jar:na] at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)[liquibase-core-2.0.5.jar:na] at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)[liquibase-core-2.0.5.jar:na] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)[liquibase-core-2.0.5.jar:na] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)[liquibase-core-2.0.5.jar:na] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)[liquibase-core-2.0.5.jar:na] at liquibase.Liquibase.update(Liquibase.java:114)[liquibase-core-2.0.5.jar:na]

    Users with the same issue

    davidvanlaatum
    1 times, last one,