From 6d7cf32691478b8488c2692a32b543169ab6dee0 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 23 Aug 2016 11:49:13 +0200 Subject: [PATCH] SONAR-7844 add missing pk to scanner_context --- .../WEB-INF/db/migrate/1308_create_table_scanner_context.rb | 2 +- .../src/main/resources/org/sonar/db/version/schema-h2.ddl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1308_create_table_scanner_context.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1308_create_table_scanner_context.rb index c225404d95a..28b2aa4f763 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1308_create_table_scanner_context.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1308_create_table_scanner_context.rb @@ -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 diff --git a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl index e04367d3179..6f3da62994d 100644 --- a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl +++ b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl @@ -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"); -- 2.39.5