Closed alpacafondue closed 11 months ago
@alpacafondue Interesting, I haven't run into this issue but I use the Windows client only to test the release. This error is reproducible by selecting multiple seasons from the list and running the client? Is this against Postgres?
Yea, this was against Postgres when running multiple seasons for player_season
. But I could also see the constraint violation happening for other table updates where the row already exists (e.g. running a season again).
Ah I see. Yes, running overlapping seasons isn't really supported at the moment. So this was specifically on the seasons table? Adding a ignore/replace there shouldn't be too hard.
I can't remember, is there an option in the Windows client to update the current season? I added a prototype back in December for a subset of tables, but I can't recall if I integrated the option into the GUI.
Right, I don't believe that option is available in the GUI from what I could tell.
Possible fix, will test on player_season
. https://github.com/mpope9/nba-sql/pull/81
With the Windows client, constraint errors can occur when running multiple seasons.on_conflict_replace should resolve this I believe in the event a constraint is violated.