]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7844 add missing pk to scanner_context
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 23 Aug 2016 09:49:13 +0000 (11:49 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 23 Aug 2016 19:38:51 +0000 (21:38 +0200)
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1308_create_table_scanner_context.rb
sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl

index c225404d95a4bc07d2b225ffd178587a61ed761a..28b2aa4f7631138dd3812168b5b53d8f5ed231d9 100644 (file)
@@ -30,6 +30,6 @@ class CreateTableScannerContext < ActiveRecord::Migration
       t.column 'created_at', :big_integer, :null => false
       t.column 'updated_at', :big_integer, :null => false
     end
-    add_index 'scanner_context', 'analysis_uuid', :name => 'scanner_context_analysis_uuid', :unique => true
+    add_primary_key 'scanner_context', 'analysis_uuid'
   end
 end
index e04367d317998e616f2d65ee3d68ba8f411dad9b..6f3da62994d76ae4cdc7de34b0130458bf188ab2 100644 (file)
@@ -82,7 +82,7 @@ CREATE TABLE "SNAPSHOTS" (
 );
 
 CREATE TABLE "SCANNER_CONTEXT" (
-  "ANALYSIS_UUID" VARCHAR(40) NOT NULL,
+  "ANALYSIS_UUID" VARCHAR(40) NOT NULL PRIMARY KEY,
   "DATA" BLOB(167772150) NOT NULL,
   "CREATED_AT" BIGINT NOT NULL,
   "UPDATED_AT" BIGINT NOT NULL
@@ -701,5 +701,3 @@ CREATE INDEX "CE_ACTIVITY_ISLASTKEY" ON "CE_ACTIVITY" ("IS_LAST_KEY");
 CREATE INDEX "CE_ACTIVITY_ISLAST_STATUS" ON "CE_ACTIVITY" ("IS_LAST", "STATUS");
 
 CREATE UNIQUE INDEX "UNIQ_PERM_TPL_CHARAC" ON "PERM_TPL_CHARACTERISTICS" ("TEMPLATE_ID", "PERMISSION_KEY");
-
-CREATE UNIQUE INDEX "SCANNER_CONTEXT_ANALYSIS_UUID" ON "SCANNER_CONTEXT" ("ANALYSIS_UUID");