-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Issue
The worker db layer is still messy.
raw queries everywhere, logic scattered across handlers, no clear source of truth.
this works for now, but it’s risky and won’t scale.
we agreed to add prisma but it needs to be done properly, not half-done.
Goals
- introduce prisma as the main orm for the worker
- define a clear prisma schema for existing models
- centralize db access via prisma client
- remove raw db queries from handlers
- keep current behavior working
Scope
- setup prisma (schema, client, config)
- map existing tables into prisma schema
- refactor handlers to use prisma
- update
MIGRATE_TO_PRISMA.mdif needed - make sure tests pass (or update them)
Acceptance
- prisma is the single way to access the db
- no raw queries left in handlers
- prisma client is cleanly initialized and reused
- worker runs without regression
- migration path is documented
Metadata
Metadata
Assignees
Labels
No labels