Initial v1 code layout
The destination of the wayfinder map: directory and module structure, the domain model as real schema files, permission boundaries expressed as code, and typed seams where the undecided parts land. Satisfies the four structural requirements earlier resolutions handed to a layout that did not exist: - a single database entry point (#11) — the pool is not exported - a scheduler entry point with actor context and no request (#13) - an entitlement assertion helper (#20, #34) — its call sites are the paid-feature list - an enumerated list of privileged RLS bypasses (#33) — three of them Seams carry real types and throw with the ticket that owns them, so the skeleton wires up and fails only where a decision is genuinely missing. Verified: tsc --noEmit clean; drizzle-kit generate produces RLS on 18 tables and 6 policies calling the release-level functions. Resolves #35 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
18
drizzle.config.ts
Normal file
18
drizzle.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { Config } from 'drizzle-kit'
|
||||
|
||||
/**
|
||||
* Drizzle owns what it can diff: tables, and the RLS policies declared
|
||||
* beside them via `pgPolicy`. It cannot diff a SQL function, so
|
||||
* `release_level`, `class_released` and the release-matrix seed live in
|
||||
* hand-authored custom migrations under `migrations/custom`.
|
||||
*
|
||||
* Generated SQL is never hand-edited. See docs/migrations.md.
|
||||
*/
|
||||
export default {
|
||||
schema: './src/db/schema/index.ts',
|
||||
out: './migrations',
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: { url: process.env.DATABASE_URL! },
|
||||
verbose: true,
|
||||
strict: true,
|
||||
} satisfies Config
|
||||
Reference in New Issue
Block a user