mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add quarterly period to Top page
This commit is contained in:
14
db/migrate/20150727210748_add_quarterly_to_top_topics.rb
Normal file
14
db/migrate/20150727210748_add_quarterly_to_top_topics.rb
Normal 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
|
||||
Reference in New Issue
Block a user