This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
app/packages
groombook-engineer[bot] 8928cd8805 fix(db): move TRUNCATE before staff upsert and add id to set clause (GRO-369)
TRUNCATE was positioned after the staff upsert block, so appointments
referencing stale staff IDs were never cleared before re-insert. Moving it
before the upsert ensures downstream FK references are purged first.

Also adds `id: s.id` to the staff upsert set clause so re-seeded rows get
their IDs overwritten to match the deterministic PRNG values — preventing
the appointments-insert referencing IDs that don't exist in the staff table.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-01 13:48:09 +00:00
..