]> source.dussan.org Git - sonarqube.git/commitdiff
fix bug on oracle to avoid restarting the server
authorsimonbrandhof <simon.brandhof@gmail.com>
Thu, 23 Dec 2010 22:02:56 +0000 (22:02 +0000)
committersimonbrandhof <simon.brandhof@gmail.com>
Thu, 23 Dec 2010 22:02:56 +0000 (22:02 +0000)
sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_measure_variation_values.rb

index 066c0c473d0099391983eb656b06081b3b82df62..c821fa8fed3a623347b765db88daf01649b3dd9c 100644 (file)
@@ -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
index f9cebf73c1e024ad2576a7e14c6a53e594f0cfb3..2869047cbe0aef150e282fdde975a4127adabd9c 100644 (file)
@@ -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
index b42ce8f440392dfab5c475d6ea93947bbd0bca60..1011e0d69e8e8bddd5b441f693e9407628c50ea9 100644 (file)
@@ -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