discourse/db/migrate/20201005165544_add_topic_slow_mode_interval.rb
Roman Rizzi 21c53ed249
FEATURE: Topic slow mode. (#10904)
Adds a new slow mode for topics that are heating up. Users will have to wait for a period of time before being able to post again.

We store this interval inside the topics table and track the last time a user posted using the last_posted_at datetime in the TopicUser relation.
2020-10-16 16:24:38 -03:00

8 lines
194 B
Ruby

# frozen_string_literal: true
class AddTopicSlowModeInterval < ActiveRecord::Migration[6.0]
def change
add_column :topics, :slow_mode_seconds, :integer, null: false, default: 0
end
end