From eb75a35f191d7fde61f668fae6e0a3b6c69a078d Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 20 Jun 2014 15:04:19 +0200 Subject: [PATCH] SONAR-5007 fix compatibility with mysql -> RULES_PROFILES.KEE must be less than 255 char long --- .../main/resources/org/sonar/core/persistence/schema-h2.ddl | 4 ++-- .../WEB-INF/db/migrate/548_add_qprofile_keys_columns.rb | 4 ++-- .../main/webapp/WEB-INF/db/migrate/549_feed_qprofile_keys.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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 0f46f3092c6..bdafd6a0deb 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 @@ -49,8 +49,8 @@ CREATE TABLE "RULES_PROFILES" ( "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "NAME" VARCHAR(100) NOT NULL, "LANGUAGE" VARCHAR(20), - "KEE" VARCHAR(1000) NOT NULL, - "PARENT_KEE" VARCHAR(1000), + "KEE" VARCHAR(255) NOT NULL, + "PARENT_KEE" VARCHAR(255), "RULES_UPDATED_AT" TIMESTAMP, "CREATED_AT" TIMESTAMP, "UPDATED_AT" TIMESTAMP diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/548_add_qprofile_keys_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/548_add_qprofile_keys_columns.rb index 3592ae1410b..920566b36df 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/548_add_qprofile_keys_columns.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/548_add_qprofile_keys_columns.rb @@ -25,8 +25,8 @@ class AddQprofileKeysColumns < ActiveRecord::Migration def self.up - add_column :rules_profiles, :kee, :string, :limit => 1000 - add_column :rules_profiles, :parent_kee, :string, :limit => 1000 + add_column :rules_profiles, :kee, :string, :limit => 255 + add_column :rules_profiles, :parent_kee, :string, :limit => 255 end end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/549_feed_qprofile_keys.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/549_feed_qprofile_keys.rb index 0f76dc624d5..7090686004f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/549_feed_qprofile_keys.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/549_feed_qprofile_keys.rb @@ -28,7 +28,7 @@ class FeedQprofileKeys < ActiveRecord::Migration execute_java_migration('org.sonar.server.db.migrations.v44.FeedQProfileKeysMigration') # set as non-null and unique - change_column :rules_profiles, :kee, :string, :limit => 1000, :null => false + change_column :rules_profiles, :kee, :string, :limit => 255, :null => false add_index :rules_profiles, :kee, :name => 'uniq_qprof_key', :unique => true remove_column :rules_profiles, :parent_name -- 2.39.5