diff --git a/db/migrate/20131227164338_add_scores_to_top_topics.rb b/db/migrate/20131227164338_add_scores_to_top_topics.rb index e8acad62b..e9bf28fb3 100644 --- a/db/migrate/20131227164338_add_scores_to_top_topics.rb +++ b/db/migrate/20131227164338_add_scores_to_top_topics.rb @@ -1,6 +1,6 @@ class AddScoresToTopTopics < ActiveRecord::Migration def change - TopTopic.periods.each do |period| + [:daily, :weekly, :monthly, :yearly].each do |period| add_column :top_topics, "#{period}_score".to_sym, :float end end 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 index 9a49627ee..7eb230ddd 100644 --- a/db/migrate/20140408152401_add_default_value_to_top_topic_scores.rb +++ b/db/migrate/20140408152401_add_default_value_to_top_topic_scores.rb @@ -1,6 +1,6 @@ class AddDefaultValueToTopTopicScores < ActiveRecord::Migration def change - TopTopic.periods.each do |period| + [:daily, :weekly, :monthly, :yearly].each do |period| change_column_default :top_topics, "#{period}_score".to_sym, 0 end end