Database
Kiosk Admin uses Prisma as its ORM and supports three database backends. SQLite requires no external service and is the default for development and small deployments.
SQLite (default)
No setup required. A dev.db file is created automatically in kiosk-admin/ when you first run migrations.
DATABASE_PROVIDER=sqliteDATABASE_URL=file:./dev.dbnpx prisma migrate devPostgreSQL
DATABASE_PROVIDER=postgresqlDATABASE_URL=postgresql://user:password@localhost:5432/kiosk_adminnpx prisma migrate devMongoDB
DATABASE_PROVIDER=mongodbDATABASE_URL=mongodb://localhost:27017/kiosk_adminnpx prisma db push # MongoDB uses db push, not migrateSwitching backends
To switch from SQLite to PostgreSQL on an existing installation:
- Export any important data first (there is no built-in migration tool between backends).
- Update
DATABASE_PROVIDERandDATABASE_URLin.env. - Run
npx prisma migrate devto create the schema in the new database. - Re-add devices and re-create users.