mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
36 lines
1.2 KiB
Markdown
36 lines
1.2 KiB
Markdown
# 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/` | Runtime logs (admin, audit) — **outside the webroot** |
|
|
| `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
|