FIX: Delete old reminder topic timers (#13611)

Following up from 5268568d23
these status type 5 topic timers are the reminder type which
have long been migrated to bookmark reminders
This commit is contained in:
Martin Brennan 2021-07-02 13:12:20 +10:00 committed by GitHub
parent 6ea4bbd2ec
commit 58941ea2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# frozen_string_literal: true
class DeleteOldReminderTopicTimers < ActiveRecord::Migration[6.1]
def up
# following up from MigrateUserTopicTimersToBookmarkReminders,
# these status type 5 topic timers are the reminder type which
# have long been migrated to bookmark reminders
DB.exec("DELETE FROM topic_timers WHERE status_type = 5")
end
def down
raise ActiveRecord::IrreversibleMigration
end
end