fix(db): reset-db categorises the Car Wash tables and role_jobs — the drift guard refused every reset on a booth carrying them
Build & push images / images (push) Successful in 2m47s
Build & push images / images (push) Successful in 2m47s
Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
This commit is contained in:
@@ -415,6 +415,14 @@ docker exec -it \
|
||||
> it) **and** you type the DB filename to confirm (`parking.sqlite`; `--yes` skips that for scripted
|
||||
> setup only). It is a **training/demo** tool — never run on a production booth's data.
|
||||
|
||||
> **Drift caught 2026-09-07:** the Car Wash module (six `carwash_*` tables) and `role_jobs` had
|
||||
> landed without a category, so the guard refused every reset on a booth carrying them. Categorised
|
||||
> now — orders + the review outbox under `--financial`, prices/categories/services/config under
|
||||
> `--config`, `role_jobs` under `--users` — and verified `--all` on a freshly migrated DB. The script
|
||||
> ships **inside the server image**, so a booth runs the fixed version only from the next deployed
|
||||
> tag; until then `docker cp` the file from the repo into the container at
|
||||
> `/app/node_modules/@parking/db/scripts/reset-db.mjs` and run the same command.
|
||||
|
||||
After `--users`/`--all` (users cleared), re-seed the first admin exactly as in §7b
|
||||
(`docker exec … node scripts/seed-admin.mjs`) so someone can log back in. Since 2026-07-06 the seed
|
||||
script **self-heals the built-in `admin` role row** that this reset also wipes — before that fix the
|
||||
|
||||
Reference in New Issue
Block a user