Database
HeySummon uses Prisma ORM and supports SQLite and PostgreSQL.
SQLite (Development)
Default for local development. Zero setup.
DATABASE_URL="file:./dev.db"npx prisma generate
npx prisma db pushPostgreSQL (Production)
Recommended for production. Used by Docker Compose setup.
DATABASE_URL="postgresql://hitlaas:password@localhost:5432/hitlaas"npx prisma migrate deployDocker Compose PostgreSQL
The included docker-compose.yml runs PostgreSQL automatically:
services:
db:
image: postgres:16
environment:
POSTGRES_USER: hitlaas
POSTGRES_PASSWORD: hitlaas
POSTGRES_DB: hitlaas
volumes:
- pgdata:/var/lib/postgresql/dataMigrating SQLite → PostgreSQL
- Update
DATABASE_URLin.envto a PostgreSQL connection string - Update
providerinprisma/schema.prismafromsqlitetopostgresql - Run
npx prisma migrate deploy(ornpx prisma db push)
⚠️
SQLite data is not automatically migrated. Export and import manually if needed.
Backups
PostgreSQL
# Backup
docker compose exec db pg_dump -U hitlaas hitlaas > backup.sql
# Restore
docker compose exec -T db psql -U hitlaas hitlaas < backup.sqlSQLite
cp dev.db dev.db.backup