Database
Database setup and usage with Cloudflare D1, Neon and PlanetScale Postgres in the Quickback Stack
Quickback treats D1 and Neon/Postgres as first-class database targets. Choose from the application's data model and query profile; the same Quickback security definitions compile to either provider.
Providers
| Provider | Best for | Why choose it |
|---|---|---|
| Cloudflare D1 | CRUD-heavy SaaS, content catalogs, internal tools, straightforward workflows | Managed SQLite, no connection strings or pooling, Cloudflare-native operations, FTS5 and JSON functions when needed |
| Neon | Data-intensive products and apps designed around PostgreSQL | Native JSONB/arrays, tsvector + GIN, PostGIS/extensions, database RLS, advanced indexing and interactive transactions through Hyperdrive |
| PlanetScale Postgres | The same Postgres implementation, hosted on PlanetScale | Identical generated schema, RLS and migrations to Neon; Cloudflare Hyperdrive only |
Quick decision
- Pick D1 when simple operations and a low-ops Cloudflare deployment are the priority.
- Pick Neon/Postgres up front when advanced search, rich data types, sustained concurrent writes, Postgres extensions, or database-level RLS are product requirements.
- Hyperdrive is optional on Neon: HTTP is the lightweight default on Cloudflare, Hyperdrive the full-featured lane for interactive transactions. On PlanetScale Postgres Hyperdrive is the only transport.
- The Postgres choice is a hosting choice:
neonandplanetscale-postgresemit byte-identical schema and security migrations for the same definitions.
Getting Started
- D1 Setup — Bindings, wrangler config, migrations
- Using D1 — Drizzle queries, dual-DB mode, schema patterns
- Neon — Serverless Postgres setup and usage
- PlanetScale Postgres — Roles, connection usernames, the cache-disabled Hyperdrive binding