What problem does it solve? Cloudflare D1 migrations generated by Drizzle ORM can silently fail, recreate tables destructively, or get stuck in a partially applied state, causing confusing "works locally, breaks in production" bugs. ## Core Features & Use Cases - Safe Migration Workflow: Generate migrations with Drizzle, inspect the SQL for destructive table-recreation patterns, then apply to both local and remote D1 databases. - Stuck Migration Recovery: Diagnose partially applied migrations by querying d1_migrations and PRAGMA table_info, then manually record the migration to unblock the pipeline. - Bulk Insert Batching: Avoid D1's parameter limit failures by chunking large multi-row INSERTs into batches of 10 rows. - Use Case: You changed a column default in your Drizzle schema and the generated migration fails with a duplicate column error. Use this workflow to inspect the SQL, verify the column exists, record the migration manually, and apply the remaining migrations. ## Quick Start Ask the agent to generate and apply a new D1 migration for your Drizzle schema, inspecting the SQL first and applying it to both local and remote databases.