Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorry, unexpected error: (_mysql_exceptions.IntegrityError) #150

Open
suspectykt opened this issue Apr 25, 2019 · 1 comment
Open

Sorry, unexpected error: (_mysql_exceptions.IntegrityError) #150

suspectykt opened this issue Apr 25, 2019 · 1 comment

Comments

@suspectykt
Copy link

suspectykt commented Apr 25, 2019

Unable to delete team

Sorry, unexpected error: (_mysql_exceptions.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (get5.match, CONSTRAINT match_ibfk_3 FOREIGN KEY (team2_id) REFERENCES team (id))') [SQL: u'DELETE FROM team WHERE team.id = %s'] [parameters: (2,)]

how to fix? help guys

@PhlexPlexico
Copy link

You cannot delete teams that have been in matches. If you wish to delete a team you must:

  • Delete the PlayerStats that has the team associated with them.
  • Delete the MapStats that the player has associated with them.
  • Delete the Matches that teams were assigned to.
  • Then delete the team.

It's been listed in this repository before, that you cannot delete a team once they have been given matches, as per stated in #30 like before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants