Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-14543

Migration 4209 fails if the PK constraint name is unexpected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 8.7
    • Fix Version/s: 8.7.1, 8.8
    • Component/s: Database
    • Labels:
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Migration to SQ 8.7 includes step #4209, which is meant to delete the primary key of the `organization_members` table.

      The implementation relies on a hardcoded PK constraint name "pk_organization_members". If the database was restored, or the table renamed in the past, the constraint name could be different for some users, failing the migration and preventing the upgrade.

      Solution: Relies on the common pattern "DropPrimaryKeySqlGenerator" that queries the DB to retrieves the constraint name, before deleting it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              pierre.guillot Pierre Guillot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: