ON CONFLICT WHERE for upserts. #13412
Labels
dialect: postgres
For issues and PRs. Things that involve PostgreSQL (and do not involve all dialects).
dialect: sqlite
For issues and PRs. Things that involve SQLite (and do not involve all dialects).
P4: nice to have
For issues that are not bugs.
status: wip
For issues and PRs. Applied when the PR is not ready yet / when work to close the issue has started.
type: feature
For issues and PRs. For new features. Never breaking changes.
Issue Creation Checklist
[x] I have read the contribution guidelines
Feature Description
Currently sequelize doesn't support upserts with unique partial indexes.
There's many cases for unique partial indexes - such as a unique constraint on rows that haven't been soft deleted.
For example, a generic membership table with permissions:
Is your feature request related to a problem? Please describe.
There's several cases where this comes up:
Describe the solution you'd like
See the code sample above.
Additional context
Part of #13240.
I also have a PR up at #13411, which is a piece of #13270 (closed)
Feature Request Checklist
Is this feature dialect-specific?
Would you be willing to implement this feature by submitting a Pull Request?
#13411
The text was updated successfully, but these errors were encountered: