aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-11-30 21:48:33 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-11-30 21:48:33 +0000
commit7cd8f34f616dfc2dd7d1b5cc6ac92073a349db92 (patch)
tree7952328994bfac12b9ecf2819a763284064b3f96 /sonar-server
parentcfde89d0b0a2015e9ff6f91ab5992f8b9dd82f48 (diff)
downloadsonarqube-7cd8f34f616dfc2dd7d1b5cc6ac92073a349db92.tar.gz
sonarqube-7cd8f34f616dfc2dd7d1b5cc6ac92073a349db92.zip
database migration : remove/update some scripts that are used only in releases <= 1.10 and remove useless methods "self.down"
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/064_complete_project_link_keys.rb37
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/067_rename_metrics.rb110
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/070_update_default_coverage_plugin.rb41
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/083_add_index_to_measures_value.rb27
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb4
14 files changed, 0 insertions, 244 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb
index 08c56f4b5b3..971e36123ec 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb
@@ -19,8 +19,6 @@
#
class SimplifyMetrics < ActiveRecord::Migration
- TYPES_MAP=['INT','INT','INT','INT','FLOAT','FLOAT','PERCENT','MILLISEC','BOOL']
-
def self.up
add_column(:metrics, :val_type, :string, :null => true, :limit => 8)
add_column(:metrics, :user_managed, :boolean, :null => true, :default => false)
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb
index 02ab0c89f38..61a92a31803 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb
@@ -24,7 +24,4 @@ class AddProjectLanguage < ActiveRecord::Migration
Project.reset_column_information
end
- def self.down
-
- end
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb
index bf4b21c677a..ab78e77cf2f 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb
@@ -34,10 +34,6 @@ class AddMeasureData < ActiveRecord::Migration
ProjectMeasure.reset_column_information
end
- def self.down
-
- end
-
class MeasureData061 < ActiveRecord::Base
set_table_name :measure_data
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb
index 01a0f6b9688..eb864438ea1 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb
@@ -23,6 +23,4 @@ class AddProjectKeeIndex < ActiveRecord::Migration
add_index :projects, :kee, :name => 'projects_kee'
end
- def self.down
- end
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/064_complete_project_link_keys.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/064_complete_project_link_keys.rb
deleted file mode 100644
index dd36a7d325d..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/064_complete_project_link_keys.rb
+++ /dev/null
@@ -1,37 +0,0 @@
- #
- # 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
- #
-class CompleteProjectLinkKeys < ActiveRecord::Migration
-
- def self.up
- ProjectLink.find(:all, :conditions => {:link_type => nil}).each do |link|
- link.link_type = ProjectLink.name_to_key(link.name)
- link.save
- end
-
- ProjectLink.update_all("name='Home'", "link_type='homepage'")
- ProjectLink.update_all("name='Sources'", "link_type='scm'")
- ProjectLink.update_all("name='Continuous integration'", "link_type='ci'")
- ProjectLink.update_all("name='Issues'", "link_type='issue'")
- ProjectLink.update_all("name='Developer connection'", "link_type='scm_dev'")
- end
-
- def self.down
- end
-end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb
index 9dc6a4e5a97..c8230241ac6 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb
@@ -23,6 +23,4 @@ class IncreaseSizeOfRulesProfilesName < ActiveRecord::Migration
change_column('rules_profiles', 'name', :string, :limit => 100)
end
- def self.down
- end
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/067_rename_metrics.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/067_rename_metrics.rb
deleted file mode 100644
index d9085a5d28b..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/067_rename_metrics.rb
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-#
-class RenameMetrics < ActiveRecord::Migration
-
- def self.up
- rename_metric('classes_count', 'classes')
- rename_metric('packages_count', 'packages')
- rename_metric('files_count', 'files')
- rename_metric('functions_count', 'functions')
- rename_metric('directories_count', 'directories')
-
- rename_metric('loc', 'lines')
- rename_metric('ccn', 'complexity')
- rename_metric('ccn_class', 'class_complexity')
- rename_metric('ccn_function', 'function_complexity')
- rename_metric('ccn_file', 'file_complexity')
- rename_metric('ccn_classes_count_distribution', 'class_complexity_distribution')
- rename_metric('ccn_functions_count_distribution', 'function_complexity_distribution')
- rename_metric('ccn_vs_cc', 'uncovered_complexity_by_tests')
-
- rename_metric('comment_ratio', 'comment_lines_density')
-
- rename_metric('test_count', 'tests')
- rename_metric('test_errors_count', 'test_errors')
- rename_metric('test_skipped_count', 'skipped_tests')
- rename_metric('test_failures_count', 'test_failures')
- rename_metric('test_success_percentage', 'test_success_density')
- rename_metric('test_details', 'test_data')
-
- rename_metric('duplicated_lines_ratio', 'duplicated_lines_density')
- rename_metric('code_coverage', 'coverage')
- rename_metric('code_coverage_line_hits_data', 'coverage_line_hits_data')
-
- rename_metric('rules_violations_count', 'violations')
- rename_metric('rules_violations', 'mandatory_violations')
- rename_metric('optional_rules_violations', 'optional_violations')
- rename_metric('rules_index', 'violations_density')
- rename_metric('rules_compliance', 'mandatory_violations_density')
- Metric.clear_cache
- end
-
- def self.down
- end
-
- def self.rename_metric(metric_name, new_metric_name)
- to_rename = Metric067.find(:first, :conditions => {:name => metric_name})
- if to_rename.nil?
- return
- end
- Metric067.delete_all("name = '#{new_metric_name}'")
-
- to_rename.name = new_metric_name
- to_rename.save!
-
- projectsdashboard = Property.find(:first, :conditions => {:prop_key => 'sonar.core.projectsdashboard.columns'})
- if not projectsdashboard.nil?
- metric_to_find = "METRIC.#{metric_name};"
- prop_value = projectsdashboard.prop_value
- if not prop_value.index(metric_to_find).nil?
- projectsdashboard.prop_value = prop_value.sub(metric_to_find,"METRIC.#{new_metric_name};")
- projectsdashboard.save!
- end
- end
-
- timemachine = Property.find(:first, :conditions => {:prop_key => 'timemachine.chartMetrics'})
- if timemachine
- prop_value = timemachine.prop_value
- if not prop_value.index(metric_name).nil?
- timemachine.prop_value = prop_value.sub(metric_name, new_metric_name)
- timemachine.save!
- end
- end
-
-
- treemap_color = Property.find(:first, :conditions => {:prop_key => 'sonar.core.treemap.colormetric', :prop_value => metric_name})
- if not treemap_color.nil?
- treemap_color.prop_value = new_metric_name
- treemap_color.save!
- end
-
- treemap_size = Property.find(:first, :conditions => {:prop_key => 'sonar.core.treemap.sizemetric', :prop_value => metric_name})
- if not treemap_size.nil?
- treemap_size.prop_value = new_metric_name
- treemap_size.save!
- end
-
- Metric.clear_cache
- end
-
- class Metric067 < ActiveRecord::Base
- set_table_name "metrics"
- end
-end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb
index 538c791d14f..b89c3437bdd 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb
@@ -47,7 +47,4 @@ class AddRulePriority < ActiveRecord::Migration
ActiveRule.update_all('failure_level=0', 'failure_level=1')
end
- def self.down
- end
-
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/070_update_default_coverage_plugin.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/070_update_default_coverage_plugin.rb
deleted file mode 100644
index d223032fe7c..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/070_update_default_coverage_plugin.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# 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
-#
-class UpdateDefaultCoveragePlugin < ActiveRecord::Migration
-
- def self.up
- property=Property070.find(:first, :conditions => ['prop_key=?','sonar.core.codeCoveragePlugin'])
- if property && property.prop_value=='clover,cobertura'
- property.prop_value='cobertura'
- property.save!
- end
- end
-
- def self.down
-
- end
-
- private
-
- class Property070 < ActiveRecord::Base
- set_table_name 'properties'
- self.primary_key = 'prop_key'
- end
-
-end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb
index 2e022349748..d2d0a1a041d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb
@@ -24,7 +24,4 @@ class AddLineToRuleFailures < ActiveRecord::Migration
RuleFailure.reset_column_information
end
- def self.down
-
- end
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb
index 19325affa55..f03c351f130 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb
@@ -26,7 +26,4 @@ class ResetTendencyDepth < ActiveRecord::Migration
end
end
- def self.down
-
- end
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb
index 8390d89bd0a..eebc5b7ab13 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb
@@ -23,7 +23,4 @@ class AddCopyResourceIdToProjects < ActiveRecord::Migration
add_column(:projects, :copy_resource_id, :integer, :null => true)
end
- def self.down
-
- end
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/083_add_index_to_measures_value.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/083_add_index_to_measures_value.rb
deleted file mode 100644
index 203f7be4b93..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/083_add_index_to_measures_value.rb
+++ /dev/null
@@ -1,27 +0,0 @@
- #
- # 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
- #
-class AddIndexToMeasuresValue < ActiveRecord::Migration
-
- def self.up
- # This issue has been canceled
- # See SONAR-1190 Make faster drilldown pages
- end
-
-end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb
index 59aec0c18b1..42bc02b50ce 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb
@@ -24,10 +24,6 @@ class DeleteSomeFindbugsRules < ActiveRecord::Migration
delete_rule('OBL_UNSATISFIED_OBLIGATION')
end
- def self.down
-
- end
-
private
def self.delete_rule(rule_key)
rule=Rule.find(:first, :conditions => {:plugin_name => 'findbugs', :plugin_rule_key => rule_key})