docs/database.md
Metadata
- Purpose: Project documentation source file.
- Domain:
documentation - Language:
md - Bytes: 1990
- Lines: 42
- Content hash (short):
b811e9ab - Source (start): docs/database.md:1
- Source (end): docs/database.md:42
Indexed Symbols
No indexed functions/methods detected in this file.
Markdown Headings (if applicable)
- H1: Database Persistence (line 1)
- H2: Required environment (line 5)
- H2: Apply migrations (line 10)
- H2: Notes (line 29)
Source Preview
# Database Persistence
Gateway persistence now relies on PostgreSQL and no longer uses in-memory resource state.
## Required environment
- `DATABASE_URL`
- `PGSSLMODE` (`disable` for local, `require` for managed providers)
## Apply migrations
1. `infra/sql/0001_init.sql`
2. `infra/sql/0002_psa_resources.sql`
3. `infra/sql/0003_idempotency.sql`
4. `infra/sql/0004_event_pipeline.sql`
5. `infra/sql/0005_job_queue.sql`
6. `infra/sql/0006_security_hardening.sql`
7. `infra/sql/0007_configuration_plane.sql`
8. `infra/sql/0008_job_metadata.sql`
9. `infra/sql/0009_workflow_execution_metadata.sql`
10. `infra/sql/0010_worker_runtime.sql`
11. `infra/sql/0011_portal_invites.sql`
Or use `scripts/apply-migrations.sh` with `DATABASE_URL` set.
Optional local sample data can be loaded with `scripts/seed-dev-data.sh`.