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

Unexpected Oracle trigger names when upgrading to 8.9

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.9, 8.9.1
    • Fix Version/s: 8.9.2
    • Component/s: Database
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Between 7.9.X and 8.9.1, several database migrations drop primary keys (mainly to migrate from auto-generated id to java-generated UUID).

      In Oracle database, auto-generated IDs are implemented with triggers. When dropping a PK, SonarQube assume that the trigger is named column_name_IDT but that's not always the case: when the database has been backup & restore, for example, triggers can have different names.

      In this situation, the database migration fails, and users have two possible workarounds:

      • Create / Rename the trigger to match what's expected by SonarQube
      • Perform the migration step manually and force the migration

      To ease migrations, the solution seems to look into the database metadata for the trigger name (on the table+column), instead of relying on a naming convention.

       

      Note: This bug only applies to SonarQube between 7.9 and 8.9, and won't happen after that: After 8.9, SonarQube doesn't use database-generated IDs, so there are no triggers to delete anymore.

        Attachments

          Activity

            People

            Assignee:
            jacek.poreda Jacek Poreda
            Reporter:
            pierre.guillot Pierre Guillot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: