summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-23 22:02:56 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-23 22:02:56 +0000
commit6813d3b0d678b0dc2833bcb3ffd808ebe0428499 (patch)
tree3697c501b615033ccab54b32467a189f9ae805ae
parentfdf1dbbcef0ea3b5fb25897bc09bc9267c7c63f9 (diff)
downloadsonarqube-6813d3b0d678b0dc2833bcb3ffd808ebe0428499.tar.gz
sonarqube-6813d3b0d678b0dc2833bcb3ffd808ebe0428499.zip
fix bug on oracle to avoid restarting the server
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_measure_variation_values.rb3
3 files changed, 4 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb
index 066c0c473d0..c821fa8fed3 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb
@@ -26,6 +26,7 @@ class AddRuleFailuresColumns < ActiveRecord::Migration
def self.up
add_column 'rule_failures', 'created_at', :datetime, :null => true
add_column 'rule_failures', 'checksum', :string , :null => true, :limit => 1000
+ RuleFailure.reset_column_information()
end
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb
index f9cebf73c1e..2869047cbe0 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb
@@ -26,6 +26,7 @@ class DeleteIsoRuleCategories < ActiveRecord::Migration
def self.up
begin
remove_column('rules', 'rules_category_id')
+ Rule.reset_column_information()
rescue
# already removed
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_measure_variation_values.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_measure_variation_values.rb
index b42ce8f4403..1011e0d69e8 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_measure_variation_values.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_measure_variation_values.rb
@@ -39,15 +39,16 @@ class AddMeasureVariationValues < ActiveRecord::Migration
def self.remove_measures_column(colname)
begin
remove_column :project_measures, colname
+ ProjectMeasure.reset_column_information()
rescue
# already removed
end
end
def self.add_measures_column(colname)
- ProjectMeasure.reset_column_information()
unless ProjectMeasure.column_names.include?(name)
add_column(:project_measures, colname, :decimal, :null => true, :precision => 30, :scale => 20)
+ ProjectMeasure.reset_column_information()
end
end
end