mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
15 lines
725 B
Ruby
15 lines
725 B
Ruby
|
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
|