Skip to content

Commit

Permalink
Fix team-user relationship in registrations
Browse files Browse the repository at this point in the history
I mistakenly created a team, deleted it, and that deleted
the user! Bad news.
  • Loading branch information
backspace committed Feb 8, 2024
1 parent 7173168 commit 7d8bf02
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Registrations.Repo.Migrations.MoveUsersToBelongToTeams do

def up do
alter table(:users) do
add(:team_id, references(:teams, type: :uuid, on_delete: :delete_all))
add(:team_id, references(:teams, type: :uuid, on_delete: :nilify_all))
end

execute("""
Expand Down

0 comments on commit 7d8bf02

Please sign in to comment.