db-sqlite icon indicating copy to clipboard operation
db-sqlite copied to clipboard

Error on `upsert()` to table with several unique/primary keys

Open vjik opened this issue 5 months ago • 0 comments

There is table with one primary key and yet another unique key. On upsert() usage throws error:

SQLSTATE[HY000]: General error: 1 ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint

Seems for SQLite requires created separate ON CONFLICT clause for each of keys.

vjik avatar Sep 12 '25 09:09 vjik