Database
Drizzle + D1 demo
A minimal data flow from a TanStack server function through Drizzle ORM to Cloudflare D1.
Todos
Stored in the local Cloudflare D1 database through Drizzle ORM.
- No todos yet. Create one below.
Drizzle ORM on Cloudflare D1
Type-safe SQLite queries running in the Cloudflare Workers runtime.
Local migration workflow
- Prepare the local D1 database once:
pnpm begin - After editing src/db/schema.ts, generate and review a migration:
pnpm db:generate - Apply it to the local database named in wrangler.jsonc:
pnpm exec wrangler d1 migrations apply <configured-database> --local - Use docs/deployment.md for production migration steps.