Database
Prismedia stores application state in PostgreSQL 16 and manages schema changes through EF Core migrations in the .NET backend.
Source of Truth
- Entity mappings live under
apps/backend/src/Prismedia.Infrastructure/Persistence. - Migrations live under
apps/backend/src/Prismedia.Infrastructure/Persistence/Migrations. - Startup applies pending migrations through the shared .NET runtime used by the API and worker.
Do not add Drizzle, @prismedia/db, SvelteKit database code, or TypeScript
database migrations.
Adding a Schema Change
- Update the EF Core entity and mapping.
- Generate an EF Core migration from the backend project.
- Read the generated migration before committing it.
- Add tests for behavior that can regress.
- Commit entity/mapping changes, migration files, tests, and changelog entry together.
The .NET backend is the only owner of persistence. The Svelte frontend should
consume data through /api/* contracts, preferably via the generated OpenAPI
client under apps/web-svelte/src/lib/api/generated.