Skip to content

Commit

Permalink
Create InvitationList and foreign key to it for Invitation
Browse files Browse the repository at this point in the history
  • Loading branch information
gazayas committed Aug 18, 2023
1 parent afe6950 commit a61c20d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateAccountOnboardingInvitationLists < ActiveRecord::Migration[7.0]
def change
create_table :account_onboarding_invitation_lists do |t|
t.references :team, null: false, foreign_key: true
t.references :sender, null: false, foreign_key: {to_table: :memberships}
t.jsonb :invitations

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddInvitationListToInvitation < ActiveRecord::Migration[7.0]
def change
add_reference :invitations, :invitation_list, null: true, foreign_key: {to_table: :account_onboarding_invitation_lists}
end
end
17 changes: 16 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a61c20d

Please sign in to comment.