# Database documentation XAMXAM stores its data in a SQLite database. See also the top-level [`docs/database.md`](../../docs/database.md). ## Quick start - **Database file:** `xamxam.db` - **Schema (baseline + seed):** `schema.sql` - **Migrations:** applied set under `app/migrations/applied/` (run via `just migrate`) ```bash just query # open an interactive sqlite3 shell on xamxam.db just init-db # (re)create xamxam.db from schema.sql just reset-db # rm xamxam.db + init-db just migrate # run pending migrations ``` ## Files here | Path | Purpose | |------|---------| | `xamxam.db` | The live SQLite database | | `schema.sql` | Full, fully-migrated schema + seed data (regenerated from the local DB) | | `backups/` | `just backup-snapshot` hot-backups (`*.db.gz`) | | `cache/` | Runtime cache (rate limits, etc.) | | `logs/` | Dev-only runtime logs (cli-server); production logs live in `/var/log/xamxam/` | | `covers/` | Cover images | | `theses/`, `tfe/`, `tmp/` | Uploaded files / staging | ## See also - [`docs/database.md`](../../docs/database.md) — schema reference, tables, common SQL - [`docs/import.md`](../../docs/import.md) — CSV import format - [`docs/export.md`](../../docs/export.md) — CSV / DB / files export + restore