[Python] "There is no unique or exclusion constraint matching the ON CONFLICT specification"...

Discussão em 'Python' iniciado por Stack, Julho 12, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to upsert a user's work experience into LinkedIn, but I would like the ability to update that experience row (assuming the user wants to rescrape their linkedIn).

    Thanks!

    Here is the code: supabase.table("experience").upsert( experience_data, on_conflict=["user_id", "company", "job_title"] ).execute()

    Here is the table constraint: ALTER TABLE experience ADD CONSTRAINT unique_experience_per_user UNIQUE (user_id, company, job_title);

    But I keep recieving this error: "There is no unique or exclusion constraint matching the ON CONFLICT specification"

    Continue reading...

Compartilhe esta Página