Hey everyone,
This is a post-mortem forum post into the data issue that appeared over the weekend. I will be going over what happened, what went wrong, and how the issue was resolved.
What happened:
A SimNFL team reached out to me regarding a player they accidentally cut and asked that I replaced them on their team. I've done this before, and had no issues.
What went wrong:
The query I placed together had grammatical issues, which forced every player onto the requesting team's team. Even better, we lost all previous team information regarding said players because it was overwritten.
How the issue was fixed:
I started with querying from the NFL contracts table and initially got everyone's roster back into their respective team. Everyone involved in prior trades and FA signings had their contracts, so that data was retained safely.
There were a few outlining issues because there appeared to be players that were either on the wrong team, or were previously on the team but showed up entirely.
After looking through the DB again, I found a few interesting issues:
Several players had old contract records that were either still somehow active, or were duplicates.
As in, there were players who had a contract length > 0 but were no longer active, and there were contracts that were active but did not have any money remaining or years remaining.
After further investigation, it was concluded that these contracts were old cut contract records that were being overwritten and even being progressed through the SimNFL progressions.
After removing the bad contract records, all NFL players that were supposed to be in FA were placed in FA. All players have now re-joined their respective teams.
With that said, I will be making the following announcements:
There are now safeguards in place that will allow me to rollback the DB in the event that anything like this happens in the future.
If there are players missing on your team, please reach out to me.
After today, I will no longer be reverting issues revolving around players cut from a roster accidentally. We have checks in place that warn the user before making decisions like these.
Free Agency will resume as planned.
~Tuscan