wedding-planner/db/migrate/20240811143801_add_parent_to_group.rb
Manuel Bustillo cc45b4c16e
All checks were successful
Run unit tests / unit_tests (pull_request) Successful in 1m35s
Define a hierarchy of groups
2024-08-11 17:26:43 +02:00

6 lines
174 B
Ruby

class AddParentToGroup < ActiveRecord::Migration[7.1]
def change
add_reference :groups, :parent, type: :uuid, index: true, foreign_key: { to_table: :groups }
end
end