wedding-planner/db/migrate/20241130185731_add_wedding_id_to_models.rb

10 lines
296 B
Ruby
Raw Permalink Normal View History

2024-11-30 19:07:36 +00:00
# Copyright (C) 2024 Manuel Bustillo
2024-11-30 20:04:17 +01:00
class AddWeddingIdToModels < ActiveRecord::Migration[8.0]
def change
[:expenses, :guests, :seats, :tables_arrangements, :groups, :users].each do |table|
2024-11-30 20:04:17 +01:00
add_reference table, :wedding, type: :uuid, null: false, foreign_key: true
end
end
end