fix(db): materialise the rating list before updating #6

Merged
benvin merged 1 commits from benvin/fix-rating-levels-pg into main 2026-09-12 22:21:31 +10:00
Member

MigrateRatingLevels issued an ExecuteUpdate while the SELECT DISTINCT reader was still open on the same connection. SQLite tolerates that, Npgsql does not, so the AppInitialisation stage aborted before any schema migration committed and every PostgreSQL instance crash-looped on startup.

  • read the distinct ratings into a list before the update loop
  • cover the migration against a real PostgreSQL, with NULL and empty OfficialRating rows present
MigrateRatingLevels issued an ExecuteUpdate while the SELECT DISTINCT reader was still open on the same connection. SQLite tolerates that, Npgsql does not, so the AppInitialisation stage aborted before any schema migration committed and every PostgreSQL instance crash-looped on startup. - read the distinct ratings into a list before the update loop - cover the migration against a real PostgreSQL, with NULL and empty OfficialRating rows present
unkin-agent added 1 commit 2026-09-12 21:00:28 +10:00
fix(db): materialise the rating list before updating
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
f59ab11c43
MigrateRatingLevels issued an ExecuteUpdate while the SELECT DISTINCT reader
was still open on the same connection. SQLite tolerates that, Npgsql does not,
so the AppInitialisation stage aborted and every PostgreSQL instance
crash-looped on startup.

- read the distinct ratings into a list before the update loop
- cover the migration against a real PostgreSQL, with NULL and empty ratings
benvin merged commit b183bec94b into main 2026-09-12 22:21:31 +10:00
benvin deleted branch benvin/fix-rating-levels-pg 2026-09-12 22:21:31 +10:00
Sign in to join this conversation.