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

Migration 4102 fails if the PK constraint name is unexpected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 8.6
    • Fix Version/s: 8.6.1
    • Component/s: Database
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Migration to SQ 8.6 includes step #4102, that is meant to delete the primary key of the `default_qprofiles` table.

      The implementation relies on an hardcoded PK constraint name "pk_default_qprofiles". 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:
              jacek.poreda Jacek Poreda
              Reporter:
              pierre.guillot Pierre Guillot
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: