What problem does it solve?
Cogni-template DB architecture reference — Postgres-vs-Doltgres split (operational vs AI-written data), per-node schema independence, drizzle configs, RLS (app_user/app_service), migrator images, Doltgres syntropy rules, and the gotchas. Use when adding/modifying DB tables, deciding which DB a new table belongs in, writing migrations, running pnpm db:*, debugging drizzle-kit errors, touching @cogni/db-schema or any @cogni/<node>-{db,doltgres}-schema, or dealing with DATABASE_URL / DOLTGRES_URL / __drizzle_migrations / per-node migrator Dockerfiles.
Core Features & Use Cases
- Ground-truth guidance for per-node database architecture decisions, migrations, and tooling alignment across Postgres and Doltgres.
- Clear rules for per-node schema independence, RLS setup, and migrator workflow to avoid cross-node leakage.
- Real-world scenarios: adding a new per-node table, choosing Doltgres for AI-knowledge data, and aligning drizzle migrations with node boundaries.
Quick Start
Follow the per-node database guidelines to decide Postgres vs Doltgres before creating or migrating any table.