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

Ability to configure a PostgreSQL schema different than "public"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Database
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      Hide
      The required Oracle driver is now 12.1. Driver for version 11g is no more supported.
      Users can still use Oracle11c but with the backward compatibility of the driver for Oracle 12g.
      Show
      The required Oracle driver is now 12.1. Driver for version 11g is no more supported. Users can still use Oracle11c but with the backward compatibility of the driver for Oracle 12g.

      Description

      Using a schema different than public requires a special operation on DB: see https://jira.sonarsource.com/browse/SONAR-5000.

      This limitation can be dropped by using the new JDBC URL parameter currentSchema that has been introduced in recent versions of PostgreSQL driver. This parameter allows to override the default schema public. The comment in sonar.properties should be changed :

      #----- PostgreSQL 9.3 or greater
      # If you don't use the schema named "public", please refer to http://jira.sonarsource.com/browse/SONAR-5000
      #sonar.jdbc.url=jdbc:postgresql://localhost/sonar
      

      Suggestion:

      # By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".
      #sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=my_schema
      

      Note that this improvement is not only a matter of documentation and JDBC URL. It requires some internal changes that make the improvement unavailable in versions lower than 7.4.

        Attachments

          Activity

            People

            Assignee:
            eric.hartmann Eric Hartmann
            Reporter:
            simon.brandhof Simon Brandhof (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: