mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:19:52 +01:00
Add migration for moving notifications for appendables to reactions
This commit is contained in:
parent
a9f988df7d
commit
a9ed8a6089
1 changed files with 11 additions and 0 deletions
11
db/migrate/20231028091613_move_appendable_notifications.rb
Normal file
11
db/migrate/20231028091613_move_appendable_notifications.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# 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
|
Loading…
Reference in a new issue