Purpose
Drizzle tables and relations describe auth and application state. The package owns connection lifetimes, migrations, audit/outbox writes, Organization provisioning and scheduled-job leases. Enum subpaths are client-safe leaves.
Public exports
| Subpath | Target |
|---|---|
. | ./src/index.ts |
./audit | ./src/audit.ts |
./relations | ./src/relations.ts |
./schema | ./src/schema/index.ts |
./schema/auth | ./src/schema/auth.ts |
./schema/audit | ./src/schema/audit.ts |
./schema/todo | ./src/schema/todo.ts |
./schema/flags | ./src/schema/flags.ts |
./schema/todo.enums | ./src/schema/todo.enums.ts |
./schema/flags.enums | ./src/schema/flags.enums.ts |
./schema/proposals | ./src/schema/proposals.ts |
./schema/webhooks | ./src/schema/webhooks.ts |
./schema/webhooks.enums | ./src/schema/webhooks.enums.ts |
./schema/proposals.enums | ./src/schema/proposals.enums.ts |
./provision-organization | ./src/provision-organization.ts |
./schema/jobs | ./src/schema/jobs.ts |
./job-db | ./src/job-db.ts |
./schema/uploads | ./src/schema/uploads.ts |
./schema/uploads.enums | ./src/schema/uploads.enums.ts |
./schema/billing | ./src/schema/billing.ts |
./schema/notifications | ./src/schema/notifications.ts |
./schema/notifications.enums | ./src/schema/notifications.enums.ts |
./schema/imports | ./src/schema/imports.ts |
./schema/imports.enums | ./src/schema/imports.enums.ts |
./schema/assistant | ./src/schema/assistant.ts |
./schema/documents | ./src/schema/documents.ts |
./schema/documents.enums | ./src/schema/documents.enums.ts |
./tenancy | ./src/tenancy.ts |
./schema/biomarkers | ./src/schema/biomarkers.ts |
./schema/lab-packages | ./src/schema/lab-packages.ts |
./schema/practices | ./src/schema/practices.ts |
./schema/lab-results.enums | ./src/schema/lab-results.enums.ts |
./schema/lab-orders.enums | ./src/schema/lab-orders.enums.ts |
./schema/practices.enums | ./src/schema/practices.enums.ts |
./schema/health-plan.enums | ./src/schema/health-plan.enums.ts |
./lab/scoring | ./src/lab/scoring.ts |
./lab/labels | ./src/lab/labels.ts |
./seed/aescolab/catalog | ./src/seed/aescolab/catalog.ts |
./schema/health-profile | ./src/schema/health-profile.ts |
./schema/lab-results | ./src/schema/lab-results.ts |
./schema/health-plan | ./src/schema/health-plan.ts |
./lab/demo-values | ./src/lab/demo-values.ts |
./lab/plan-rules | ./src/lab/plan-rules.ts |
./lab/result-sets | ./src/lab/result-sets.ts |
./seed/aescolab/accounts | ./src/seed/aescolab/accounts.ts |
./seed/aescolab/history | ./src/seed/aescolab/history.ts |
./schema/bookings | ./src/schema/bookings.ts |
./schema/lab-orders | ./src/schema/lab-orders.ts |
./lab/order-pipeline | ./src/lab/order-pipeline.ts |
./seed/aescolab/pipeline | ./src/seed/aescolab/pipeline.ts |
./seed/aescolab/biomarkers | ./src/seed/aescolab/biomarkers.ts |
./schema/lab-import | ./src/schema/lab-import.ts |
./schema/lab-import.enums | ./src/schema/lab-import.enums.ts |
These paths come from packages/db/package.json. A . entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.
How to extend
Generate and review a journaled migration. Register needed relations in the schema aggregate. Keep enum values in import-free leaves and scope domain rows by Organization. Use transactions for domain changes and their audit/outbox records.
Read the postgres schema and durable state guide for the full flow.