sailfork / t3code-github / .repos/ alchemy-effect/ website/ src/ content/ docs/ sql/ databases.mdx

Choose the database independently from the application runtime where supported. For example, a Cloudflare Worker or Hetzner application can both use Neon Postgres.

Choose a database

DatabaseEngineConnection pathSetup
AWS RDS / AuroraPostgres or MySQLVPC connection; Data API on supported configurationsRDS & Aurora · Aurora + Drizzle
Aurora DSQLDistributed SQL with Postgres wire compatibilityIAM-authenticated connectionDSQL + Drizzle
Cloudflare D1SQLiteNative Worker bindingD1 + Drizzle
Durable Object storageSQLite per named objectInstance storageDurable Objects
Fly Managed PostgresPostgresPrivate connection from a Fly ServiceManaged Postgres
NeonPostgresDirect or pooled URL; Hyperdrive from WorkersNeon branches · Connections
PlanetScale PostgresPostgresRole connection URL; Hyperdrive from WorkersPlanetScale Postgres
PlanetScale VitessMySQLPassword connection URL; Hyperdrive from WorkersPlanetScale MySQL
Prisma PostgresPostgresDatabase connection URLPrisma Postgres
Railway PostgresPostgresPrivate service URL or public TCP proxyRailway Postgres
Railway MySQLMySQLPrivate service URL or public TCP proxyRailway MySQL
TursoSQLite (libSQL)libSQL URL and tokenTurso databases · Connections

Hyperdrive pools connections to a database; it is not a database itself. The Hetzner guide hosts the application on Hetzner and the database on Neon.

Choose a client

Prisma ORM v8 requires PostgreSQL 17+. Aurora DSQL has its own authentication and SQL constraints; Postgres wire compatibility does not establish Prisma support or support for every PostgreSQL feature.

Commit migration files

pnpm exec drizzle-kit generate
git add src/schema.ts drizzle.config.ts drizzle
git diff --cached
git commit -m "Add schema migration"

This example uses out: "./drizzle"; use the output directory configured by your generator and apply committed SQL through the selected database's migration workflow. Private databases require a runner with network access.

Drizzle migrations · Handwritten SQL · Prisma contracts · Runtime integration guides