Factory DB Schema Architect

Use when designing or modifying database schemas, migrations, multi-tenant data models, or polymorphic table structures. Carries the factory's data-layer conventions — Drizzle with domain-partitioned schema modules, `_shared.ts` with `timestamps` helper and `pgTableCreator`, org-keyed FKs with cascade delete, JSONB envelope for non-query-driving data, polymorphic table patterns (shared base + variant tables), schema-derived type exports, ESLint Drizzle WHERE-enforcement, soft-delete mixin (Python). Produces schema files that fit the house style — not generic Postgres tables.

nonlinear-xyz 00b1ec3 5.9 KB Updated

File contents

nonlinear-xyz/factory-kit/tree/main/skills/factory-db-schema-architect commit 00b1ec3497

Frequently asked questions

npx skillmds@latest add nonlinear-xyz/factory-db-schema-architect