get5-web icon indicating copy to clipboard operation
get5-web copied to clipboard

Sorry, unexpected error: (_mysql_exceptions.IntegrityError)

Open suspectykt opened this issue 5 years ago • 1 comments

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

suspectykt avatar Apr 25 '19 08:04 suspectykt

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.

PhlexPlexico avatar Apr 25 '19 13:04 PhlexPlexico