summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-20 15:04:19 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-20 15:27:19 +0200
commiteb75a35f191d7fde61f668fae6e0a3b6c69a078d (patch)
tree4d37f549623550043a7248928b63b68251ed7aa1
parent9366cb85997d872d4656eac38bb9ef835789432d (diff)
downloadsonarqube-eb75a35f191d7fde61f668fae6e0a3b6c69a078d.tar.gz
sonarqube-eb75a35f191d7fde61f668fae6e0a3b6c69a078d.zip
SONAR-5007 fix compatibility with mysql -> RULES_PROFILES.KEE must be less than 255 char long
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/548_add_qprofile_keys_columns.rb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/549_feed_qprofile_keys.rb2
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