Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-2703

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 1.2.3
    • 1.2.0
    • Database - MySQL

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              tim@atlassian.com TimP
              tim@atlassian.com TimP
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: