mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
rename topic_status_update to topic_timer
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
class MoveAutoCloseColumnsToTopicStatusUpdate < ActiveRecord::Migration
|
||||
def up
|
||||
# The 1 in the fourth column is TopicStatusUpdate.types[:close], an enum with value 1.
|
||||
execute <<~SQL
|
||||
INSERT INTO topic_status_updates(topic_id, user_id, execute_at, status_type, based_on_last_post, created_at, updated_at)
|
||||
SELECT
|
||||
t.id,
|
||||
t.auto_close_user_id,
|
||||
t.auto_close_at,
|
||||
#{TopicStatusUpdate.types[:close]},
|
||||
1,
|
||||
t.auto_close_based_on_last_post,
|
||||
t.auto_close_started_at,
|
||||
t.auto_close_started_at
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class RenameTopicStatusUpdatesToTopicTimers < ActiveRecord::Migration
|
||||
def change
|
||||
rename_table :topic_status_updates, :topic_timers
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user