-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(connection): deprecate sql server 2008 #10704
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10704 +/- ##
===========================================
+ Coverage 74.54% 96.36% +21.82%
===========================================
Files 85 94 +9
Lines 8186 9028 +842
===========================================
+ Hits 6102 8700 +2598
+ Misses 2084 328 -1756
Continue to review full report at Codecov.
|
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.
LGTM, but breaking. Rather than throwing error we should show deprecation warning.
34a02a6
to
4c93a34
Compare
@sushantdhiman, now only a warning is shown |
4c93a34
to
676ba0b
Compare
This needs some cleanup
Once you update with master you will notice there is some duplication with this certain code here and here. We should move this is utils perhaps and add some more unit tests against this. With that there is no need to parse version here |
ed76931
to
8e6543c
Compare
Done. Finally I discarded the test about the warning message. The reason is that I can't spy on deprecation warning functions using sinon. If later we use errors for unsupported DB versions, I would be able to make tests again. |
@@ -9,3 +9,4 @@ exports.noTrueLogging = deprecate(noop, 'The logging-option should be either a f | |||
exports.noStringOperators = deprecate(noop, 'String based operators are deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/querying.html#operators', 'SEQUELIZE0003'); | |||
exports.noBoolOperatorAliases = deprecate(noop, 'A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed.', 'SEQUELIZE0004'); | |||
exports.noDoubleNestedGroup = deprecate(noop, 'Passing a double nested nested array to `group` is unsupported and will be removed in v6.', 'SEQUELIZE0005'); | |||
exports.noUnsupportedVersion = (dialect, version, minVer) => deprecate(noop, `(${dialect}) Database version ${version} is unsupported. Only ${minVer} and higher are supported.`, 'SEQUELIZE0006')(); |
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.
We can't use a single deprecation code fo for multiple versions/dialects.
I'm in a deadlock. On the one hand @SimonSchick, you are pushing for dialect/version specific warnings. On the other hand @sushantdhiman, you are pushing for an abstracted solution using I can do either
Or
Also, the more I look at [0]: Docs for util.deprecate |
04e7542
to
baffe4b
Compare
baffe4b
to
9ee6105
Compare
Closing this PR in favor of #12218, Thanks for this work :) |
Deprecate sql server 2008 which will become completely unsupported by Microsoft in July 9, 2019. This will helps us clean sequelize code by removing some mssql specific hacks in the future.
The
versionSupport
method can be easily extended to other dialects. Additionally, usesemver.coherce
for robustness. Some DBs that report incomplete non-conforming semver versions (e.g. 9.5 instead of 9.5.0).Related to issues #10284 #10285