schema0-db-schema
Installation
SKILL.md
Database Schema
File Location
packages/db/src/
├── index.ts # Database client (createDb) and exports
├── schema/
│ ├── index.ts # Barrel re-exports (export * from "./{entity}")
│ └── [entity].ts # Table + all derived schemas (insert, select, update, form)
└── migrations/ # Auto-generated — never hand-write
7 Schemas Per Entity
Every entity file defines exactly 7 schemas:
- Table definition --
pgTable(...)withtext("id").primaryKey() - Insert schema --
createInsertSchema(table, overrides)with callback overrides for nullable columns
Related skills
More from schema0/skills
schema0-dev
>-
23schema0-mobile
Mobile platform patterns — React Native / Expo, worker architecture, ORPC client, and navigation
17schema0-rls
Row-level security setup — RLS policies, authenticated database connections, and user-scoped data access
17schema0-ai
AI SDK integration with ORPC — chat streaming, prompt-response, tool calling, and provider configuration
17schema0-testing
Testing guide for web and mobile platforms — bun:test, Jest, PGlite, 3-layer validation, and test templates
17schema0-web-crud
Web frontend CRUD features — query collections, table columns, dialogs, forms, views, sidebar, and orchestration
17