fix(ops): tools-image kopierar infrastructure/migrations sa db:migrate hittar journalen
- Dockerfile.tools: COPY infrastructure/migrations (migrate.ts laste /build/infrastructure/migrations men mappen saknades -> 'Cant find meta/_journal.json'). - RUNBOOK: nollstall anvandare med DELETE FROM users (respekterar creator_user_id ON DELETE SET NULL), aldrig TRUNCATE CASCADE. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -131,3 +131,13 @@ curl -s -o /dev/null -w "internt: %{http_code}\n" http://127.0.0.1:4100/healthz
|
||||
curl -s -o /dev/null -w "externt: %{http_code}\n" https://api.cibello.app/healthz
|
||||
sudo docker compose -f /opt/cibello-platform/infrastructure/docker/docker-compose.production.yml ps
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. Nollställa användardata (försiktigt)
|
||||
|
||||
Använd **`DELETE FROM users`**, aldrig `TRUNCATE users CASCADE`. Recept har en FK
|
||||
`creator_user_id → users` med `ON DELETE SET NULL`: `DELETE` respekterar det och
|
||||
**behåller receptkatalogen** (nollställer bara skaparen), medan `TRUNCATE ... CASCADE`
|
||||
ignorerar `SET NULL` och sveper med hela recept-tabellen. Ta alltid en RDS-snapshot
|
||||
först, och kör SQL:en via samma `docker exec app-api node`-mönster som db-koll-scripten.
|
||||
|
||||
Reference in New Issue
Block a user