FEATURE: add quarterly period to Top page

This commit is contained in:
Neil Lalonde
2015-07-28 12:31:31 -04:00
parent dc8a68fd29
commit 7518918b8f
6 changed files with 78 additions and 36 deletions

View File

@@ -0,0 +1,14 @@
class AddQuarterlyToTopTopics < ActiveRecord::Migration
def change
add_column :top_topics, :quarterly_posts_count, :integer, default: 0, null: false
add_column :top_topics, :quarterly_views_count, :integer, default: 0, null: false
add_column :top_topics, :quarterly_likes_count, :integer, default: 0, null: false
add_column :top_topics, :quarterly_score, :float, default: 0.0
add_column :top_topics, :quarterly_op_likes_count, :integer, default: 0, null: false
add_index :top_topics, [:quarterly_posts_count]
add_index :top_topics, [:quarterly_views_count]
add_index :top_topics, [:quarterly_likes_count]
add_index :top_topics, [:quarterly_op_likes_count]
end
end