Embedded database or Postgres
The embedded database is PGlite: Postgres compiled to run inside the server. It is what you get when
DATABASE_URL is not set, and its files are kept in apps/server/.data/pglite (change it with PGLITE_DATA_DIR).
Use Postgres
Point the server at a database withDATABASE_URL:
devias. It is for development only.
Migrations
The database schema is created and updated by migrations, plain SQL files inapps/server/drizzle.
- On the embedded database they run automatically when the server starts.
- On Postgres they don’t, unless you set
MIGRATE_ON_BOOT=1. Otherwise, run them yourself before starting a new version:
Related
- Deploy: run the server and the studio.
- Environment variables: every setting in one table.