SQLite
Embedded SQLite for local development and self-hosted deployments.
The embedded adapter is the default for local development and for anything self-hosted on Bun or Node with a writable disk. It applies the bundled migrations on construction, so there is no separate setup step.
Driver selection
sqlite() picks a driver for the runtime it finds:
| Runtime | Driver |
|---|---|
Bun, or an explicit client | bun:sqlite through Drizzle |
Node (next start, react-router-serve, Astro node) | node:sqlite |
Both are resolved lazily through createRequire, never a static import, so a
bundler cannot hoist bun:sqlite into a build that will run on Node — or
into a Workers bundle, where neither exists.
Options
Defaults to "status.sqlite", relative to the process working directory.
Use an absolute path in production.
An existing bun:sqlite client when you want to own its lifecycle.
Cannot be combined with file.
Defaults to true. Applies the bundled migrations on construction.
:memory: is ideal for tests: each instance starts migrated and empty, and
disappears with the process.
Extra methods
Beyond the shared adapter contract, the SQLite adapter exposes:
listResults() reads raw rows — useful for exports and ad-hoc analysis —
and close() releases the connection in a test teardown.
Operational notes
- The file must live on a writable, persistent disk. Serverless filesystems are ephemeral or read-only, which is why neither Vercel nor Cloudflare offers SQLite in the generator matrix.
- Back it up like any SQLite database: copy the file while the process is
idle, or use
sqlite3 .backup. - One process should own the file. A single container or VM running the framework server plus the scheduler is the intended shape.
heyo-status db migratereports that the embedded migrations are applied automatically; there is nothing further to run.
Where it fits
| Deployment | SQLite | Alternative |
|---|---|---|
| Local development | yes | — |
| Bun or Node container | yes | PostgreSQL |
| Vercel | no | PostgreSQL |
| Cloudflare Workers | no | D1 |