Database Internals
BookBoss uses SeaORM for database access. PostgreSQL, MySQL, MariaDB, and SQLite are all supported.
Environment Variables
The following environment variables are used by database-related just commands:
| Variable | Used by |
|---|---|
PGUSER | just create-database, just database |
PGPASSWORD | just create-database, just database |
PGDATABASE | just create-database, just database |
PGADMINUSER | just create-database |
PGADMINPASSWORD | just create-database |
BOOKBOSS__DATABASE__DATABASE_URL | Migrations, entity generation |
Connection string format for BOOKBOSS__DATABASE__DATABASE_URL:
- PostgreSQL:
postgres://user:password@host:port/database - MySQL:
mysql://user:password@host:port/database - SQLite:
sqlite::/path/to/fileorsqlite::memory:
Warning: Secrets must be encrypted with
sops. Never commit plaintext credentials.
Migrations
Migrations run automatically on application startup. No manual steps are required.
Integration Tests
Integration tests for each backend run in Docker via Colima:
colima start
just postgres-integration-tests
just mysql-integration-tests
just mariadb-integration-tests
just sqlite-integration-tests
colima stop