aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2019-02-01 10:29:50 +0100
committersonartech <sonartech@sonarsource.com>2019-02-11 09:11:43 +0100
commitcc7ee64201bf5dece53fdbcb3a986c4206e0bf78 (patch)
tree11ff406519dbb468525020cb560f700b6c03c053 /server/sonar-db-core
parent27d19d7a35c91d702b4c3b411bbf97fe71256125 (diff)
downloadsonarqube-cc7ee64201bf5dece53fdbcb3a986c4206e0bf78.tar.gz
sonarqube-cc7ee64201bf5dece53fdbcb3a986c4206e0bf78.zip
Revert "SONAR-11650 Drop DATA_TYPE from FILE_SOURCES"
This reverts commit 54ddc262
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl3
1 files changed, 2 insertions, 1 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 f4564b57007..dae2190297c 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
@@ -674,6 +674,7 @@ CREATE TABLE "FILE_SOURCES" (
"LINE_HASHES_VERSION" INTEGER,
"LINE_COUNT" INTEGER NOT NULL,
"BINARY_DATA" BLOB,
+ "DATA_TYPE" VARCHAR(20),
"DATA_HASH" VARCHAR(50),
"SRC_HASH" VARCHAR(50),
"REVISION" VARCHAR(100),
@@ -681,7 +682,7 @@ CREATE TABLE "FILE_SOURCES" (
"UPDATED_AT" BIGINT NOT NULL
);
CREATE INDEX "FILE_SOURCES_PROJECT_UUID" ON "FILE_SOURCES" ("PROJECT_UUID");
-CREATE UNIQUE INDEX "FILE_SOURCES_FILE_UUID" ON "FILE_SOURCES" ("FILE_UUID");
+CREATE UNIQUE INDEX "FILE_SOURCES_UUID_TYPE" ON "FILE_SOURCES" ("FILE_UUID", "DATA_TYPE");
CREATE INDEX "FILE_SOURCES_UPDATED_AT" ON "FILE_SOURCES" ("UPDATED_AT");