mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Drop duration column from topic timers (#13543)
The duration column has been ignored since the commit4af77f1e38for topic_timers, we use duration_minutes instead. Also removing the duration key from Topic.set_or_create_timer. The only plugin to use this was discourse-solved, which doesn't use it any longer sincec722b94a97
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DropDurationColumnFromTopicTimers < ActiveRecord::Migration[6.1]
|
||||
DROPPED_COLUMNS ||= {
|
||||
topic_timers: %i{duration}
|
||||
}
|
||||
|
||||
def up
|
||||
DROPPED_COLUMNS.each do |table, columns|
|
||||
Migration::ColumnDropper.execute_drop(table, columns)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :topic_timers, :duration, :string
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user