[E00-S03] PostgreSQL adapter and migration runner #60

Open
opened 2026-08-26 23:59:56 +00:00 by kpcto · 1 comment
Owner

Parent epic: [E00] Repository and runtime foundation (#28)

Intent

Provide a PostgreSQL database adapter isolated to the database-postgres package and a migration runner with a migration ledger and advisory locking.

Acceptance criteria

  • PostgreSQL 18.6 container is the database
  • pg/Kysely imports are isolated to database-postgres
  • migration ledger is created
  • advisory lock prevents concurrent migration runners
  • migration failure produces a structured diagnostic
  • app does not report ready before migrations complete

Explicitly out of scope

  • Docker Compose baseline stack (E00-S02)
  • configuration service validation (E00-S04)
  • CI quality baseline pipeline (E00-S05)

Test plan

  • empty database migration succeeds
  • second migration run is idempotent
  • concurrent migration lock test passes
  • intentionally failing migration fixture is covered

Rollback note

  • revert the migration file/commit; the advisory lock releases when the runner exits with no data change

Owning stream

platform

Risk quadrant

agent-full

> Parent epic: [E00] Repository and runtime foundation (#28) ## Intent Provide a PostgreSQL database adapter isolated to the `database-postgres` package and a migration runner with a migration ledger and advisory locking. ## Acceptance criteria - PostgreSQL 18.6 container is the database - `pg`/Kysely imports are isolated to `database-postgres` - migration ledger is created - advisory lock prevents concurrent migration runners - migration failure produces a structured diagnostic - app does not report ready before migrations complete ## Explicitly out of scope - Docker Compose baseline stack (E00-S02) - configuration service validation (E00-S04) - CI quality baseline pipeline (E00-S05) ## Test plan - empty database migration succeeds - second migration run is idempotent - concurrent migration lock test passes - intentionally failing migration fixture is covered ## Rollback note - revert the migration file/commit; the advisory lock releases when the runner exits with no data change ### Owning stream platform ### Risk quadrant agent-full
kpcto added this to the Sprint 0 milestone 2026-08-26 23:59:56 +00:00
kpcto added the
kind
story
status
ready
labels 2026-08-26 23:59:56 +00:00
bot-dispatcher added
status
proposed
and removed
status
ready
kind
story
labels 2026-08-26 23:59:58 +00:00
Member

Auto-reverted by dispatcher: DoR lint: required section "Intent" is empty; required section "Explicitly out of scope" is empty; required section "Test plan" is empty; required section "Rollback note" is empty

status/ready may only be applied by a human maintainer.

> Auto-reverted by dispatcher: DoR lint: required section "Intent" is empty; required section "Explicitly out of scope" is empty; required section "Test plan" is empty; required section "Rollback note" is empty `status/ready` may only be applied by a human maintainer.
kpcto added the
kind
story
label 2026-08-27 21:23:03 +00:00
Sign in to join this conversation.