Hey there I am having a team that can be selected on a user, and the foreign key is saved.
but when I am trying to delete a team that is selected for a user it cannot be done, it just gives an exception.
(Ecto.ConstraintError) constraint error when attempting to delete struct: * foreign_key: users_team_id_fkey If you would like to convert this constraint into an error, please call foreign_key_constraint/3 in your changeset and define the proper constraint name. The changeset has not defined any constraint.
I dont want my users to see this, i searched about foreign_key_constraint but not too sure where to put it, or what is the proper way to deal with this issue nicely.