From 31931f4895ba39884b84dd2b43bc6f360e1a0758 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 20 Feb 2015 18:14:38 +0100 Subject: [PATCH] Remove constraints on ISSUES.COMPONENT_UUID and PROJECT_UUID -> keep them NULLABLE meanwhile https://jira.codehaus.org/browse/SONAR-5503 --- .../WEB-INF/db/migrate/773_remove_issue_component_ids.rb | 4 +--- .../main/resources/org/sonar/core/persistence/schema-h2.ddl | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_remove_issue_component_ids.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_remove_issue_component_ids.rb index c0898b7dd59..42d480edd01 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_remove_issue_component_ids.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_remove_issue_component_ids.rb @@ -32,9 +32,7 @@ class RemoveIssueComponentIds < ActiveRecord::Migration remove_index 'issues', :name => 'issues_root_component_id' remove_column 'issues', 'component_id' remove_column 'issues', 'root_component_id' - change_column 'issues', :component_uuid, :string, :limit => 50, :null => false - change_column 'issues', :project_uuid, :string, :limit => 50, :null => false - + if dialect()=='sqlserver' add_index :issues, :component_uuid, :name => 'issues_component_uuid' add_index :issues, :project_uuid, :name => 'issues_project_uuid' diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index 86d2134ef54..092477c188c 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -442,8 +442,8 @@ CREATE TABLE "GRAPHS" ( CREATE TABLE "ISSUES" ( "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "KEE" VARCHAR(50) UNIQUE NOT NULL, - "COMPONENT_UUID" VARCHAR(50) NOT NULL, - "PROJECT_UUID" VARCHAR(50) NOT NULL, + "COMPONENT_UUID" VARCHAR(50), + "PROJECT_UUID" VARCHAR(50), "RULE_ID" INTEGER, "SEVERITY" VARCHAR(10), "MANUAL_SEVERITY" BOOLEAN NOT NULL, -- 2.39.5