69c9c7d117
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: Paperclip <noreply@paperclip.ing>