aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorEric Hartmann <hartmann.eric@gmail.com>2018-01-29 18:03:46 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2018-02-08 13:41:00 +0100
commita201df8720aab627050b9f14f0b35c75780e3a92 (patch)
treefb0afd216136adad2c9a465f3fcc5c85769af7f8 /server/sonar-db-core
parent697cdc1de821864d77a507bdb3834f1239066c57 (diff)
downloadsonarqube-a201df8720aab627050b9f14f0b35c75780e3a92.tar.gz
sonarqube-a201df8720aab627050b9f14f0b35c75780e3a92.zip
SONAR-10311 Add migration for DEPRECATED_RULE_KEYS table
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
index 175424d028c..5c287cea0ec 100644
--- a/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
+++ b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
@@ -171,6 +171,15 @@ CREATE TABLE "RULE_REPOSITORIES" (
"CREATED_AT" BIGINT
);
+CREATE TABLE "DEPRECATED_RULE_KEYS" (
+ "UUID" VARCHAR(40) NOT NULL PRIMARY KEY,
+ "RULE_ID" INTEGER NOT NULL,
+ "OLD_REPOSITORY_KEY" VARCHAR(200) NOT NULL,
+ "OLD_RULE_KEY" VARCHAR(255) NOT NULL,
+ "CREATED_AT" BIGINT
+);
+CREATE UNIQUE INDEX "UNIQ_DEPRECATED_RULE_KEYS" ON "DEPRECATED_RULE_KEYS" ("OLD_REPOSITORY_KEY", "OLD_RULE_KEY");
+CREATE INDEX "RULE_ID_DEPRECATED_RULE_KEYS" ON "DEPRECATED_RULE_KEYS" ("RULE_ID");
CREATE TABLE "RULES" (
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),