Error on `upsert()` to table with several unique/primary keys
Open
Nobody has claimed this yet.
type:bug
- Dominant language
- PHP
- Stars
- 30
- Forks
- 13
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported upsert() failure against a SQLite table with one primary key and another unique key. Inspect the SQLite driver's upsert path and add or update coverage for this schema; done means the upsert succeeds without the ON CONFLICT constraint error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100