What problem does it solve?
D1’s Cloudflare-specific SQLite constraints (always-on foreign keys, no native BOOLEAN/DATETIME, strict bound-parameter and size limits) can silently break standard Drizzle/SQLite schemas unless you generate D1-aware patterns.
Core Features & Use Cases
- Generate D1-correct Drizzle ORM schemas with proper column types and constraints (e.g., BOOLEAN via
integer({ mode: 'boolean' }), timestamps via integer({ mode: 'timestamp' })).
- Produce migration-ready guidance and documentation, including migration command suggestions and a DATABASE_SCHEMA.md content plan.
- Model relationships and indexing safely for D1, including correct FK handling and common indexing patterns that align with D1 behavior.
- Use Case: scaffold a new D1 data layer (tables, relations, indexes, and exports) so your Worker code can query with correct types and avoid runtime edge-case failures.
Quick Start
Ask the skill to generate a D1-compatible Drizzle schema (tables, foreign keys, indexes, relations, and type exports) from your data model description.