Files
openwork/ee/packages/den-db
Source Open 0589897b2f feat(den): add org-managed llm provider library (#1343)
* feat(den): add org-managed llm provider library

Let Den admins curate shared providers and models with encrypted credentials, then let the app connect through the existing add-provider flow. This keeps org-wide model access consistent without requiring per-user OAuth setup.

* docs(den): prefer longer db encryption keys

* fix(den): pass db encryption key through local dev

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-04-06 10:17:21 -07:00
..

den-db

@openwork-ee/den-db owns the Den database schema and migration history.

Canonical workflow

  • Keep schema changes in src/schema/**.
  • Keep generated SQL migrations in drizzle/.
  • Always generate new migrations with Drizzle from this package.
  • Do not create migrations from den-api, den-controller, or other apps.

Commands

Generate a migration after editing the schema:

pnpm --dir ee/packages/den-db db:generate

Apply schema directly to a development database:

pnpm --dir ee/packages/den-db db:push

Run Drizzle migrations against a configured database:

pnpm --dir ee/packages/den-db db:migrate

Notes

  • db:generate is the default path for new migration files.
  • drizzle/meta/ must stay in sync with the SQL migration history so future generation stays incremental.
  • Only repair drizzle/meta/ manually when recovering broken Drizzle history.