schema-integrity

Installation
SKILL.md

Schema Integrity

When to Use

Use when working on database schema, migrations, ORM queries, data consistency between web (Prisma) and worker (Drizzle), cross-store reconciliation (Postgres ↔ Aitable.ai), or debugging build failures caused by schema drift. Not for video pipeline, UI design, Stripe, or PayPal billing code.

Critical Rules

  1. Single PostgreSQL database. Both apps share DATABASE_URL. Changes affect both.
  2. PostgreSQL is ALWAYS the SSOT. If data differs between Postgres and any external store, Postgres wins.
  3. Prisma owns web, Drizzle owns worker. Never mix ORMs in the same app.
  4. Manual sync required. No automated cross-ORM sync. After changing one schema, check the other.
  5. Run Schema Sentinel before every deploy: npx tsx tools/schema-sentinel.ts --strict
  6. Build both apps after schema changes: web (npm run build) AND worker (npm run build).
  7. Update docs/Aitable Brand Config table after adding any table or changing shared fields.
  8. All Aitable syncs are one-way: Postgres → Aitable.ai. Never write from Aitable back to Postgres.

Schema Management

Installs
1
First Seen
May 18, 2026