diff --git a/db/migrate/20140408152401_add_default_value_to_top_topic_scores.rb b/db/migrate/20140408152401_add_default_value_to_top_topic_scores.rb new file mode 100644 index 00000000000..9a49627ee71 --- /dev/null +++ b/db/migrate/20140408152401_add_default_value_to_top_topic_scores.rb @@ -0,0 +1,7 @@ +class AddDefaultValueToTopTopicScores < ActiveRecord::Migration + def change + TopTopic.periods.each do |period| + change_column_default :top_topics, "#{period}_score".to_sym, 0 + end + end +end