Skip to content

Commit dc4921f

Browse files
committed
fix: solve FK issue
1 parent 8122b8a commit dc4921f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

db/migrate/20260426194058_remove_messages_user_foreign_keys.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
# at the application layer via recipient_type / sender_type.
77
class RemoveMessagesUserForeignKeys < ActiveRecord::Migration[7.2]
88
def up
9-
remove_foreign_key :messages, name: 'fk_rails_12e9de2e48', if_exists: true # recipient_id -> users
10-
remove_foreign_key :messages, name: 'fk_rails_273a25a7a6', if_exists: true # user_id -> users
9+
# no-op: FKs already removed by SupportPlayerMessagingSenderTypeRemoveFKs (20260426193938)
1110
end
1211

1312
def down
14-
add_foreign_key :messages, :users, column: :user_id
15-
add_foreign_key :messages, :users, column: :recipient_id
13+
# no-op: reversing 20260426193938 restores the FKs
1614
end
1715
end

0 commit comments

Comments
 (0)