@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
mdx 50 lines 3.54 KB
Raw
1 ---
2 title: Databases
3 description: Compare database engines, connection paths, and deployment guides across Alchemy's SQL providers.
4 ---
5
6 Choose the database independently from the application runtime where supported. For example, a Cloudflare Worker or Hetzner application can both use Neon Postgres.
7
8 ## Choose a database
9
10 | Database | Engine | Connection path | Setup |
11 | --- | --- | --- | --- |
12 | AWS RDS / Aurora | Postgres or MySQL | VPC connection; Data API on supported configurations | [RDS & Aurora](/aws/data/rds) · [Aurora + Drizzle](/aws/data/drizzle-aurora) |
13 | Aurora DSQL | Distributed SQL with Postgres wire compatibility | IAM-authenticated connection | [DSQL + Drizzle](/aws/data/drizzle-dsql) |
14 | Cloudflare D1 | SQLite | Native Worker binding | [D1 + Drizzle](/cloudflare/data/d1-drizzle) |
15 | Durable Object storage | SQLite per named object | Instance storage | [Durable Objects](/cloudflare/compute/durable-objects#sql-migrations) |
16 | Fly Managed Postgres | Postgres | Private connection from a Fly Service | [Managed Postgres](/fly/data/postgres) |
17 | Neon | Postgres | Direct or pooled URL; Hyperdrive from Workers | [Neon branches](/neon/data/branching) · [Connections](/neon/data/connections) |
18 | PlanetScale Postgres | Postgres | Role connection URL; Hyperdrive from Workers | [PlanetScale Postgres](/planetscale/data/postgres) |
19 | PlanetScale Vitess | MySQL | Password connection URL; Hyperdrive from Workers | [PlanetScale MySQL](/planetscale/data/mysql) |
20 | Prisma Postgres | Postgres | Database connection URL | [Prisma Postgres](/prisma/data/postgres) |
21 | Railway Postgres | Postgres | Private service URL or public TCP proxy | [Railway Postgres](/railway/data/postgres) |
22 | Railway MySQL | MySQL | Private service URL or public TCP proxy | [Railway MySQL](/railway/data/mysql) |
23 | Turso | SQLite (libSQL) | libSQL URL and token | [Turso databases](/turso/databases) · [Connections](/turso/connections) |
24
25 [Hyperdrive](/cloudflare/data/hyperdrive) pools connections to a database; it is not a database itself. The [Hetzner guide](/hetzner/data/drizzle-postgres) hosts the application on Hetzner and the database on Neon.
26
27 ## Choose a client
28
29 | Engine | Typed schema queries | Raw SQL |
30 | --- | --- | --- |
31 | Postgres | [Drizzle.Postgres](/sql/drizzle/postgres) · [Prisma ORM](/sql/prisma/postgres) | [SQL.Postgres](/sql/effect-sql/postgres) |
32 | MySQL | [Drizzle.MySQL](/sql/drizzle/mysql) | [SQL.MySQL](/sql/effect-sql/mysql) |
33 | D1 | [Drizzle.D1](/sql/drizzle/d1) | [SQL.D1](/sql/effect-sql/d1) |
34 | libSQL (Turso) | [Drizzle.LibSQL](/sql/drizzle/libsql) | [SQL.LibSQL](/sql/effect-sql/libsql) |
35 | Durable Objects | [Drizzle.DurableObject](/sql/drizzle/migrations#durable-object-migrations) | [Instance SQL](/sql/effect-sql/migrations#durable-object-migrations) |
36
37 Prisma ORM v8 requires PostgreSQL 17+. Aurora DSQL has its [own authentication and SQL constraints](/aws/data/drizzle-dsql); Postgres wire compatibility does not establish Prisma support or support for every PostgreSQL feature.
38
39 ## Commit migration files
40
41 ```sh
42 pnpm exec drizzle-kit generate
43 git add src/schema.ts drizzle.config.ts drizzle
44 git diff --cached
45 git commit -m "Add schema migration"
46 ```
47
48 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.
49
50 [Drizzle migrations](/sql/drizzle/migrations) · [Handwritten SQL](/sql/effect-sql/migrations) · [Prisma contracts](/sql/prisma/migrations) · [Runtime integration guides](/sql#find-an-integration)