feat(db): provision Postgres and add score schema migration
Wire in the txt_game_scores database provision and create the players/games tables via a provision-scoped migration so Child 2 can implement the server-side score persistence. - module.yml: requires postgres database (txt_game_scores) with env_map for host/port/user/password/name; empty env keys added so env-sync populates them after provisioning - migrations/package.json: ESM, pg + typescript devdeps - migrations/provision/postgres/000-init-scores.ts: creates players and games tables with idempotent IF NOT EXISTS guards and two supporting indexes (scoreboard sort, history lookup) Server code, Dockerfile, and docker-compose.yml are unchanged — server integration is deferred to the follow-on child task. Task: 3dab55e3-9792-47a0-a4a6-ba7757517314
This commit is contained in:
+16
@@ -11,7 +11,23 @@ docker:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
requires:
|
||||
- provider: postgres
|
||||
type: database
|
||||
name: txt_game_scores
|
||||
env_map:
|
||||
TXT_GAME_DB_HOST: host
|
||||
TXT_GAME_DB_PORT: port
|
||||
TXT_GAME_DB_USER: user
|
||||
TXT_GAME_DB_PASSWORD: password
|
||||
TXT_GAME_DB_NAME: database
|
||||
|
||||
env:
|
||||
DOMAIN:
|
||||
from: node.domain
|
||||
default: localhost
|
||||
TXT_GAME_DB_HOST:
|
||||
TXT_GAME_DB_PORT:
|
||||
TXT_GAME_DB_USER:
|
||||
TXT_GAME_DB_PASSWORD:
|
||||
TXT_GAME_DB_NAME:
|
||||
|
||||
Reference in New Issue
Block a user