Make migration reversible
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 48s
Run unit tests / check-licenses (pull_request) Successful in 55s
Run unit tests / copyright_notice (pull_request) Successful in 1m41s
Run unit tests / unit_tests (pull_request) Successful in 3m32s
Run unit tests / build-static-assets (pull_request) Successful in 35m56s

This commit is contained in:
Manuel Bustillo 2025-06-01 19:57:09 +02:00
parent 11f98bd712
commit 6100ce0b99

View File

@ -1,7 +1,7 @@
class FixCascadingWeddingDeletion < ActiveRecord::Migration[8.0]
def change
[:expenses, :groups, :guests, :seats, :tables_arrangements, :users].each do |table|
remove_foreign_key table, column: :wedding_id
remove_foreign_key table, :weddings, column: :wedding_id
add_foreign_key table, :weddings, on_delete: :cascade
end
end