Platform notes

Review driver defaults, hosting behavior, and current runtime limits for Drizzle and Prisma.

Driver support depends on both the ORM and the runtime you choose. ViteHub provides sensible defaults, but you should still install the matching driver or adapter package for the database you run in production.

Default drivers

ViteHub chooses a default driver when you do not set db.driver explicitly.

ORMDialectDefault
Drizzlesqlitelibsql
Drizzlepostgresqlpostgres-js, or pglite when no URL is configured
Drizzlemysqlmysql2
Prismasqlitebetter-sqlite3, or libsql for LibSQL URLs
Prismapostgresqlpg
Prismamysqlmariadb

Local development

SQLite file URLs default to .data/db/sqlite.db when you do not provide a custom URL. Embedded PostgreSQL with PGlite defaults to .data/db/pglite.

ViteHub creates the local database directory for file-based SQLite and PGlite runtimes when it opens the local client.

Cloudflare and bindings

Drizzle remains the Cloudflare-first path for this package version. It can wire D1 bindings for SQLite and Hyperdrive bindings for PostgreSQL or MySQL when you provide the matching binding metadata.

Prisma on Cloudflare D1 is not supported. Choose Drizzle when you need D1.

Driver and adapter packages

Install the package that matches the runtime you configure:

  • Drizzle requires the matching driver package such as @libsql/client, pg, mysql2, or @electric-sql/pglite.
  • Prisma requires the matching adapter package such as @prisma/adapter-pg, @prisma/adapter-better-sqlite3, @prisma/adapter-libsql, or @prisma/adapter-mariadb.

Changing db.driver without installing the matching package will leave the app configured for a runtime that cannot boot.