-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat: added support for index include #14900
Conversation
0c5dff0
to
1f0b81f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to do a more in-depth review later, but these are my initial comments
@WikiRik looking at the test, do you want this to exist under the dialects > mssql folder? |
I guess you can include the tests after the following; sequelize/test/integration/model.test.js Line 612 in 79a5300
But I might prefer a separate test file |
d22c89f
to
9cb070d
Compare
I've updated the test location now. |
Can you enable the support for db2 and postgres in this PR as well? |
9cb070d
to
60d1bbc
Compare
@WikiRik I've added support now, however there are some conditions for postgres and db2. For postgres, the include option for indexes is only supported in version 11 and above therefore this would not be supported for all the versions of postgres that sequelize currently support. For db2, the include option for indexes is only available for unique indexes. I've added in some errors and tests to make sure that these limitations are enforced. Let me know if you have any questions/suggestions |
Thanks! I think we're dropping support for postgres 10 in v7 as well since the final release of that will come out on November 10th so let's wait with merging this PR until we do so. That makes the implementation easier. Pinging @ephys @sdepold as well to confirm dropping postgres 10 support as soon as postgres itself does it |
index.test.js - changed test string to default errors.test.js - updated test dialect check errors.test.js - added create index with include errors.test.js - updated test descriptions
60d1bbc
to
cda86ee
Compare
I've created a PR to drop the postgres 10 support; it's #15289. Once that has been merged, this PR can be updated accordingly |
Index include is supported by the all sequelize postgres versions
I've removed the postgres db version checks now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like really good work! Thank you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments are redundant since the error is clear. But it's a non-blocking issue.
Thanks for working on this!
Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
Hi, any idea when this will be released? I don't see it in v6.26.0, will it be included in v6.26.1? |
This will land in the next v7 alpha, there are no plans from the maintainers to backport this to v6 but we're always open to PRs from the community |
Tagging PR to sequelize/website#501 |
Pull Request Checklist
Please make sure to review and check all of these items:
yarn test
oryarn test-DIALECT
pass with this change (including linting)?Description Of Change
This pull requests adds the ability to support indexes with included columns for MSSQL.
For information on how this works and the benefits, please see Microsoft documentation of this feature.
Fixes #15124