Repository navigation
Conversation
Resolves sequelize#4132 Heavily inspired by sequelize#6325
Author
|
Could I please have some feedback? I've also noticed that the code coverage checks are failing, and it seems that the new code isn't being triggered. Is the code coverage being measured against PostgreSQL 9.5? |
Author
|
friendly ping |
|
Can I help somehow? |
Contributor
2 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #4132
Heavily inspired by #6325
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Futurein the changelog?NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
This change adds the small extensions
options.conflict.targetandoptions.conflict.constrainttoModel.upsertto support using PostgreSQL 9.5'sINSERT... ON CONFLICTfeature. This replaces the stored procedure that's currently used. If Postgres >= 9.5 is used and nooptions.conflict.*options are specified, the primary key column(s) are implicitly used as the conflict target. If Sequelize is used with PostgreSQL prior to 9.5, we still use the existing stored procedure.This change is