mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 11:15:49 +08:00
17 lines
741 B
Ruby
17 lines
741 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddQuarterlyToTopTopics < ActiveRecord::Migration[4.2]
|
|
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
|