Store
AI Rules FileArchive

Drizzle ORM Bundle

For Developers using Drizzle ORM on any adapter

A complete CLAUDE.md rules file for Drizzle ORM. Covers schema definition, relations, migrations, all major adapters, and the 10 most hallucinated patterns — with fixes.

Created

Description

Drizzle has the highest AI hallucination rate of any TypeScript ORM — every model gets it wrong on relations, migration workflow, and adapter-specific imports. This bundle corrects that. Covers driver-specific import paths, schema definition with type inference, relations (required for relational API), generate vs push vs migrate, connection patterns for postgres.js / Neon / Turso / Bun / mysql2, and 10 common mistakes with exact fixes.

What's included

  • CLAUDE.md rules file (853 lines)
  • README.md — installation for Claude Code, Cursor, Windsurf, Copilot
  • Customization guide

Sample content

  • Driver imports are not interchangeable

    Never mix pg-core, sqlite-core, mysql-core. Each has its own import path. Always confirm the driver. `pgTable` from `drizzle-orm/pg-core`, not a generic `table()`.

  • relations() is required for the relational query API

    Without `relations()`, `db.query.*` silently returns empty results. Schema definition alone is not enough. Always define relations if you're using `db.query`.

  • generate vs push vs migrate

    `drizzle-kit generate` creates SQL migration files. `push` applies schema directly (dev only, no history). `migrate` runs generated files. Never use `push` in production.

3 of 853 included items previewed above.

Delivery

Instant download after Stripe checkout. File: nightforge-drizzle-bundle.zip