-
-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SQLite] Fix onConflict targets #475
Conversation
The indexed column(s) must be wrapped in parentheses (cp. https://www.sqlite.org/lang_UPSERT.html).
The indexed column(s) must be wrapped in parentheses (cp. https://www.sqlite.org/lang_UPSERT.html).
Examples are taken from the pg-core documentation.
@wkunert thanks a lot! Right after @dankochetov will check - will include in in main and next release we will have |
Hey guys, I think there's an issue here with composite primary keys where now we end up with double parentheses. See example schema and query generated below and associated error:
i See double parentheses added above, which causes error: ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint. Opened bug report: #518 |
As reported in #410 upserts are failing when using SQLite. @krzysztofciombor already identified the root cause (missing parentheses around the target), this PR delivers the proposed fix and corresponding tests.