DEV: Remove all code referencing at_desktop bookmark reminders (#9650)

We have found no need for these reminder types, so we are removing the code for them.
This commit is contained in:
Martin Brennan
2020-05-06 15:22:43 +10:00
committed by GitHub
parent 4239ca1f8d
commit fa572d3a7a
30 changed files with 36 additions and 371 deletions

View File

@@ -0,0 +1,17 @@
# frozen_string_literal: true
class MigrateAtDesktopBookmarkReminders < ActiveRecord::Migration[6.0]
def up
# reminder_type 0 is at_desktop, which is no longer valid
DB.exec(
<<~SQL, now: Time.zone.now
UPDATE bookmarks SET reminder_type = NULL, reminder_at = NULL, updated_at = :now
WHERE reminder_type = 0
SQL
)
end
def down
raise ActiveRecord::IrreversibleMigration
end
end