Prisma setup with PostgreSQL and first migration #3
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
All persistence goes through Prisma against PostgreSQL (ADR 0002/0006); migrations must run automatically on startup from day one.
Scope
Add Prisma to
apps/apiwithschema.prismacontaining only aninstance_settingskey-value model for now, a first migration, aPrismaService(Nest injectable), automaticprisma migrate deployon API start, and adbservice (pinned postgres image, volume, healthcheck) in the dev Compose overlay. Extend/readyz(new endpoint) to check DB connectivity and applied migrations.Acceptance criteria
docker compose up db+ API start applies the migration automatically/api/v1/readyzreturns 503 when the DB is down, 200 when uppnpm --filter api db:seedruns (empty for now) and is wired for later fixturesTechnical notes
Dependencies
Depends on #2.
Size: ~1 day
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.