5a09290d9f
The TRUNCATE of impersonation_sessions/audit_logs was running after the staff upsert. When a prior seed left impersonation_sessions rows referencing staff records, ON CONFLICT DO UPDATE on staff violated the FK constraint on impersonation_sessions.staff_id. Moving the TRUNCATE before the staff block ensures all impersonation rows are cleared before any staff insert/update attempt. Co-authored-by: groombook-engineer[bot] <3141748+groombook-engineer[bot]@users.noreply.github.com> Co-authored-by: Paperclip <noreply@paperclip.ing>