diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-07 00:06:43 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-07 00:06:43 +0000 |
commit | 39323540f630b889cb2f35346cfd9367ad62d7c6 (patch) | |
tree | 0a0a29ad88310c19ade3f3dc3c0dcf3466cb71d9 /sonar-server | |
parent | 2a284ad6f574db6d1fb2c043790ffa2c18d5dcd1 (diff) | |
download | sonarqube-39323540f630b889cb2f35346cfd9367ad62d7c6.tar.gz sonarqube-39323540f630b889cb2f35346cfd9367ad62d7c6.zip |
SONAR-1988 Description of rule parameters should be optional
SONAR-2029 The field Rule.configKey should be nullable
Diffstat (limited to 'sonar-server')
2 files changed, 74 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb new file mode 100644 index 00000000000..b6667c5fe9b --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb @@ -0,0 +1,37 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2009 SonarSource SA +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 2.5 +# +class SetNullableRuleConfigKey < ActiveRecord::Migration + + def self.up + add_column(:rules, :temp_plugin_config_key, :string, :limit => 500, :null => true) + Rule.reset_column_information + + Rule.update_all('temp_plugin_config_key=plugin_config_key') + + remove_column(:rules, :plugin_config_key) + rename_column(:rules, :temp_plugin_config_key, :plugin_config_key) + Rule.reset_column_information + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb new file mode 100644 index 00000000000..874c8101969 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb @@ -0,0 +1,37 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2009 SonarSource SA +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 2.5 +# +class SetNullableRuleParameterDescription < ActiveRecord::Migration + + def self.up + add_column(:rules_parameters, :temp_description, :string, :limit => 4000, :null => true) + RulesParameter.reset_column_information + + RulesParameter.update_all('temp_description=description') + + remove_column(:rules_parameters, :description) + rename_column(:rules_parameters, :temp_description, :description) + RulesParameter.reset_column_information + end + +end |