diff options
author | Aurelien Poscia <aurelien.poscia@sonarsource.com> | 2023-09-06 15:40:04 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-09-15 20:03:05 +0000 |
commit | 411338f7a7aee58d58a5f6e743804c06f3cef6a8 (patch) | |
tree | 043e598da4c529aba3765d75bf4ac4ab2a0d8faf /server/sonar-db-dao/src/schema | |
parent | d0a437c1a09b2ba7cd09020d9a29a87639aba9c7 (diff) | |
download | sonarqube-411338f7a7aee58d58a5f6e743804c06f3cef6a8.tar.gz sonarqube-411338f7a7aee58d58a5f6e743804c06f3cef6a8.zip |
SONAR-20392 Add github_perms_mapping table and unique index
Diffstat (limited to 'server/sonar-db-dao/src/schema')
-rw-r--r-- | server/sonar-db-dao/src/schema/schema-sq.ddl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index 8d0ad1275a1..94c89f05103 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -357,6 +357,14 @@ CREATE TABLE "GITHUB_ORGS_GROUPS"( ); ALTER TABLE "GITHUB_ORGS_GROUPS" ADD CONSTRAINT "PK_GITHUB_ORGS_GROUPS" PRIMARY KEY("GROUP_UUID"); +CREATE TABLE "GITHUB_PERMS_MAPPING"( + "UUID" CHARACTER VARYING(40) NOT NULL, + "GITHUB_ROLE" CHARACTER VARYING(100) NOT NULL, + "SONARQUBE_ROLE" CHARACTER VARYING(64) NOT NULL +); +ALTER TABLE "GITHUB_PERMS_MAPPING" ADD CONSTRAINT "PK_GITHUB_PERMS_MAPPING" PRIMARY KEY("UUID"); +CREATE UNIQUE NULLS DISTINCT INDEX "UNIQ_GITHUB_PERM_MAPPINGS" ON "GITHUB_PERMS_MAPPING"("GITHUB_ROLE" NULLS FIRST, "SONARQUBE_ROLE" NULLS FIRST); + CREATE TABLE "GROUP_ROLES"( "UUID" CHARACTER VARYING(40) NOT NULL, "ROLE" CHARACTER VARYING(64) NOT NULL, |