aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-09 18:06:34 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-16 15:47:03 +0200
commitc1bb816479420cfec70d889657efa425ee033f50 (patch)
tree54625a0e933e18db832aa6a3e33549330df8e337 /server/sonar-web
parentd61d264aa6b1faaa234964c9fef627d212e2ef3c (diff)
downloadsonarqube-c1bb816479420cfec70d889657efa425ee033f50.tar.gz
sonarqube-c1bb816479420cfec70d889657efa425ee033f50.zip
SONAR-5001 Add DB column to store description format
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb
new file mode 100644
index 00000000000..ea5eec81f89
--- /dev/null
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb
@@ -0,0 +1,13 @@
+class AddRulesDescriptionFormat < ActiveRecord::Migration
+
+ class Rule < ActiveRecord::Base
+ end
+
+ def self.up
+ add_column :rules, :description_format, :string, :null => true, :limit => 20
+
+ Rule.reset_column_information
+ Rule.update_all({:description_format => 'HTML', :updated_at => Time.now})
+ end
+
+end