Das Löschen eines Branches ist permanent. Es KANN NICHT rückgängig gemacht werden. Fortfahren?
fix/db-permissions nach main vor 1 Monat zusammengeführt
Das Löschen eines Branches ist permanent. Es KANN NICHT rückgängig gemacht werden. Fortfahren?
Summary
Fixes the “permission denied for table players” error found during live verification of PR #4.
Root cause: PostgreSQL 15+ revokes
CREATEfrom non-superusers in the public schema by default. Child 1's000-init-scores.tsmigration ran as thepostgressuperuser (viaPROVISION_USER), which in this setup ispostgresitself — so the tables were created owned bypostgres. The app usertxt_game_scoreswas never granted any privileges, causing every DB operation in production to fail withpermission denied.Fix: Adds
migrations/provision/postgres/001-grant-permissions.tswhich grantsSELECT, INSERT, UPDATEonplayersandgames, plusUSAGE, SELECTongames_id_seq, to the app user (PROVISION_DATABASE = txt_game_scores).000-init-scores.tsis left unchanged (frozen baseline — immutable once deployed)migrations/package.jsonalready exists from PR #3 — no changes neededPROVISION_DATABASE(HAL postgres provisioner convention: user = database name)Test plan
001-grant-permissions.tson ace; logs show[txt-game migration-001] permissions granted to txt_game_scoresdocker logs txt-gameno longer showspermission denied for table playersdocker_restart txt-gameon ace → reload same incognito window → values identical (persistence verified)Task: d1c49d59-57bd-4eba-9e22-f25a04157ad4 Fixes: live-verification failure from PR #4
eab696ce42zusammengeführt.