My biggest data mistake that I've made more often than I care to admit, is updating a game with t:team and o:team backward.
For example:
- In the database, I have a game with t:team as the Bruins, and o:team as the Canadiens. All my other data is good.
- I attempt to update the line in that game, and I inadvertently set t:team=Canadiens and o:team=Bruins for the same date.
Instead of updating the line for t:team=Bruins and o:team=Canadiens and date=20220112, I add a new record to the database as:
- t:team=Canadiens and o:team=Bruins and date=20220112.
The line is populated, and all other fields are None.
I end up with a mess.
Trying to clean it up, regardless if I use t:team=Bruins or o:team=Bruins and the associated other two keys, the database returns the record will all the data first, and the record with all the Nones second.
Of course, I made a big mess and have a lot of these. I'd like to surgically remove the records with Nones, and leave the valid records. My remedy is to delete everything and re-add it correctly, but that takes a lot of time. I'm hoping there's some special index or key I can use to solve my problem and remove the record I want to delete.
I'd also love a way to enhance my code to check to be sure I have t:team and o:team set correctly when attempting to update a specific game and avoid creating a new record if I get it backward, but using the Get request doesn't care which team I assign to t:team and o:team.