public class SchemaMigration {
public final static int VERSION_UNKNOWN = -1;
- public static final int LAST_VERSION = 164;
+ public static final int LAST_VERSION = 166;
public final static String TABLE_NAME = "schema_migrations";
@Column(name = "name", updatable = true, nullable = false)\r
private String name;\r
\r
- @Column(name = "plugin_rule_key", updatable = false, nullable = true)\r
+ @Column(name = "plugin_rule_key", updatable = false, nullable = true, length = 200)\r
private String key;\r
\r
@Column(name = "enabled", updatable = true, nullable = true)\r
private Boolean enabled = Boolean.TRUE;\r
\r
- @Column(name = "plugin_config_key", updatable = true, nullable = true)\r
+ @Column(name = "plugin_config_key", updatable = true, nullable = true, length = 500)\r
private String configKey;\r
\r
// Godin: This field should be named priority, otherwise StandardRulesXmlParserTest fails\r
--- /dev/null
+#
+# 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
--- /dev/null
+#
+# 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