Repository navigation
ADR 0002 sqlite wal and portability
github-actions[bot] edited this page Oct 15, 2026
·
1 revision
Generated from
docs/adr/0002-sqlite-wal-and-portability.mdin the repository. Edit it there; this wiki is rebuilt on every change.
Accepted.
Small fleets are fine on SQLite, but the tool is multi-user, so the default rollback-journal mode causes "database is locked" errors under concurrent writes. Larger fleets will outgrow SQLite entirely.
Enable WAL, synchronous=NORMAL, and busy_timeout via a SQLAlchemy engine
connect event, guarded to SQLite so it is a no-op on other engines. Provide a
model-driven JSON export/import (manage.py db-export / db-import) that moves
data to Postgres or MariaDB by changing DATABASE_URL.
- Concurrent multi-user use works out of the box on SQLite.
- Migration is a two-command operation, no ORM rewrite.
- Import upserts by primary key, so it is idempotent.
- Postgres sequences need a one-time reset after import (documented).
Repository · Docker Hub · Report a security problem · MIT licence
Start
Deploy
- Deploy on AWS EC2
- Run on Any Cloud
- Configuration
- MQTT Heartbeat
- VPN and Network
- Database Migration
Use
How it is built
Project
Decision records