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

Migration 4207 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 #4207, that is meant to delete the primary key of the `alm_app_installs` table.

      The implementation relies on an hardcoded PK constraint name "pk_alm_app_installs". 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: