Retrospring/db/migrate/20231028091613_move_appenda...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
392 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class MoveAppendableNotifications < ActiveRecord::Migration[7.0]
def up
Notification::where(target_type: "Appendable").update_all(target_type: "Reaction") # rubocop:disable Rails/SkipsModelValidations
end
def down
Notification::where(target_type: "Reaction").update_all(type: "Appendable") # rubocop:disable Rails/SkipsModelValidations
end
end