diff options
author | Godin <mandrikov@gmail.com> | 2010-12-16 00:56:42 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-16 00:56:42 +0000 |
commit | 96caf6eac13b66a73d0ee572ad3a361c38e4b53a (patch) | |
tree | 73887c03c31ac8d172f93cf3e3c79a38e144d67b /sonar-server/src | |
parent | a8026252cd527d5aeb5897b641ee4a8df19a452c (diff) | |
download | sonarqube-96caf6eac13b66a73d0ee572ad3a361c38e4b53a.tar.gz sonarqube-96caf6eac13b66a73d0ee572ad3a361c38e4b53a.zip |
SONAR-1722: Add DB columns for profiles inheritance
Diffstat (limited to 'sonar-server/src')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb new file mode 100644 index 00000000000..1424404baf8 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb @@ -0,0 +1,36 @@ +# +# 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 AddColumnsForProfilesInheritance < ActiveRecord::Migration + + def self.up + add_column 'active_rules', 'inherited', :boolean, :null => true + add_column 'active_rules', 'overrides', :boolean, :null => true + ActiveRule.reset_column_information + ActiveRule.update_all(ActiveRule.sanitize_sql_for_assignment({:inherited => false, :overrides => false})) + + add_column 'rules_profiles', 'parent_id', :integer, :null => true + Profile.reset_column_information + end + +end |