diff options
author | Aurelien Poscia <aurelien.poscia@sonarsource.com> | 2022-08-08 16:03:28 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-08-10 20:03:08 +0000 |
commit | a5d505ac9b71b401691f452c69a994495c09cedb (patch) | |
tree | 39721a0a1bc515ad6e3e6bf505213e5a2d46ad48 /server/sonar-db-dao | |
parent | 3a1cbb57ea9e240d804c5208a7e0dbc49cd5d0ab (diff) | |
download | sonarqube-a5d505ac9b71b401691f452c69a994495c09cedb.tar.gz sonarqube-a5d505ac9b71b401691f452c69a994495c09cedb.zip |
SONAR-17156 add unique index on project_uuid of project_badge_token and clean-up duplicates
Diffstat (limited to 'server/sonar-db-dao')
-rw-r--r-- | server/sonar-db-dao/src/schema/schema-sq.ddl | 1 |
1 files changed, 1 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 148cd2ec489..6ff53f42894 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -639,6 +639,7 @@ CREATE TABLE "PROJECT_BADGE_TOKEN"( "UPDATED_AT" BIGINT NOT NULL ); ALTER TABLE "PROJECT_BADGE_TOKEN" ADD CONSTRAINT "PK_PROJECT_BADGE_TOKEN" PRIMARY KEY("UUID"); +CREATE UNIQUE INDEX "UNIQ_PROJECT_BADGE_TOKEN" ON "PROJECT_BADGE_TOKEN"("PROJECT_UUID" NULLS FIRST); CREATE TABLE "PROJECT_BRANCHES"( "UUID" CHARACTER VARYING(50) NOT NULL, |