Foreign key recreation fails on mysql when upgrading from 1.1 to 1.2+

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 1.2.3
    • Affects Version/s: 1.2.0
    • Component/s: Database - MySQL

      MySQL isn't listed as a supported database for versions of Stash prior to 1.2 . If you happen to be running on MySQL and you upgrade to 1.2 you hit the following error:

      liquibase Change Set liquibase/r1_2/m03.xml::STASHDEV-616-03::dpinn failed.  Error: Error executing SQL ALTER TABLE `stash`.`cs_repo_membership` DROP FOREIGN KEY `fk_cs_repo_membership_changeset`: Error on rename of './stash/cs_repo_membership' to './stash/#sql2-3b6-32e' (errno: 152)
      liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE `stash`.`cs_repo_membership` DROP FOREIGN KEY `fk_cs_repo_membership_changeset`: Error on rename of './stash/cs_repo_membership' to './stash/#sql2-3b6-32e' (errno: 152)
      

      The problem is that mysql is treating the identifier arg to DROP FOREIGN KEY case sensitively, and in the initial schema it was created in ALL CAPS.

      This will be fixed in the next 1.2.x release.

              Assignee:
              TimP
              Reporter:
              TimP
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: