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

Atlassian JIRA | Gurleen Anand [Atlassian] | 4 years ago
  1. 0

    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.

    Atlassian JIRA | 4 years ago | Gurleen Anand [Atlassian]
    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
  2. 0

    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.

    Atlassian JIRA | 4 years ago | Gurleen Anand [Atlassian]
    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
  3. 0

    Unable to update 1.0.3 db?

    GitHub | 2 years ago | ojhunt
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE commafeed.FEEDENTRYTAGS ADD CONSTRAINT fk_entry_id FOREIGN KEY (entry_id) REFERENCES commafeed.FEEDENTRIES (id): Can't create table 'commafeed.#sql-3e1_87a6' (errno: 150)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Can liquibase handle a partially updated schema?

    Stack Overflow | 4 years ago | Kramer
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE limit ADD id serial: ERROR: column "id" of relation "limit" already exists
  6. 0

    PL/SQL and SQL script in one sqlFile with liquibase?

    Stack Overflow | 1 year ago | Gabor
    liquibase.exception.DatabaseException: ORA-06550: 4 line, 1 col: PLS-00103: Encountered the symbol: "/" [Failed SQL: BEGIN aud.someProcedure('parameter'); END; // insert into test_table(_id, value) VALUES(1, 'test') ]

  1. davidvanlaatum 1 times, last 7 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Liquibase Core
    Liquibase.update
    1. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)[liquibase-core-2.0.5.jar:na]
    2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)[liquibase-core-2.0.5.jar:na]
    3. liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)[liquibase-core-2.0.5.jar:na]
    4. liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)[liquibase-core-2.0.5.jar:na]
    5. liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)[liquibase-core-2.0.5.jar:na]
    6. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)[liquibase-core-2.0.5.jar:na]
    7. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)[liquibase-core-2.0.5.jar:na]
    8. liquibase.Liquibase.update(Liquibase.java:114)[liquibase-core-2.0.5.jar:na]
    8 frames