SQLite
Configure a SQLite file, run automatic migrations and check what was applied.
Use SQLite for local development or a self-hosted server with a persistent disk.
Create a project with --deployment later --database sqlite; the generator
configures SQLite in heyo-status.config.ts along with the page and API.
To change the database path, edit its database: sqlite("status.sqlite")
setting. The relative filename uses the process's working directory.
For a deployed container or VM, use a writable, persistent path such as
sqlite("/data/status.sqlite") and mount /data as a volume. A database in an
ephemeral container filesystem disappears on redeploy.
When do migrations run?
You don't need to run SQL by hand. sqlite() enables migrations by
default. Bun applies the bundled migrations when it creates the adapter;
Node applies them before the first database operation. This happens when the
app loads its config, including when you run the generated app for the first
time. Starting it again after a package upgrade applies any new migrations.
Already applied migrations are skipped.
The generated project also has a command you can run explicitly:
For SQLite, that command loads the config and reports that embedded migrations
were applied. It isn't an extra prerequisite before bun dev. You can also run the CLI directly from the project root after a
global install.
To check the file after startup, use the SQLite CLI if you have it installed:
Use the same path as in sqlite(...). The table lists applied migration IDs,
not your check results; status_results holds those. Before upgrading a
production database, back up the file using SQLite's online backup command:
migrate: false turns automatic migrations off. Only use it if you apply
the full schema before any status-page request; otherwise reads and check runs
will fail on missing tables.
Runtime and options
sqlite() uses bun:sqlite on Bun and node:sqlite on Node. Use Node
22.13+ for node:sqlite without a flag; Node 22.5–22.12 requires
--experimental-sqlite. On older Node versions, use Bun or another adapter.
The driver is chosen at runtime, so the config doesn't import either one
statically.
file defaults to "status.sqlite". Pass an existing bun:sqlite client if
you manage its lifecycle yourself; client and file cannot be combined.
:memory: is lost when the process ends. Neither Vercel nor Cloudflare Workers
provides the persistent local disk this adapter needs: use
PostgreSQL or
D1 instead.
For the complete migration list and the other adapters, see Schema and migrations.