Skip to content
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

Case sensitive MS SQL database operations fail because of uppercase system table references #9337

Merged
merged 7 commits into from Apr 30, 2018

Conversation

@szabolcsmaj
Copy link
Contributor

@szabolcsmaj szabolcsmaj commented Apr 21, 2018

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)? (see below)
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions? (not new but changed the existing ones)
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md? (this is my first PR but hopefully yes)

npm run test-mssql fails but it failed for me before my changes. After my changes it only fails at the same place:

> sequelize@5.0.0-beta.3 test-integration /tmp/sequelize
> mocha $npm_package_options_mocha "test/integration/**/*.test.js"

FIXME: I want to be supported in this dialect as well :-(


  [MSSQL] Alias
      1) "before each" hook for "should uppercase the first letter in alias getter, but not in eager loading"
      2) "after each" hook for "should uppercase the first letter in alias getter, but not in eager loading"


            0 passing (50ms)
            2 failing

Description of change

Please read PR #9336 for description.

szabolcsmaj and others added 2 commits Apr 21, 2018
Case sensitive DB collation threw errors for certain DB operations for MS SQL databases (e.g.: `removeColumn`). This was because the names of system schemas and views are all lowercase. Fixed the referenced names in `query-generator.js`
@codecov
Copy link

@codecov codecov bot commented Apr 21, 2018

Codecov Report

Merging #9337 into master will not change coverage.
The diff coverage is 100%.

@@ -135,9 +135,13 @@ module.exports = BaseTypes => {
inherits(DATE, BaseTypes.DATE);

DATE.prototype.toSql = function toSql() {
return 'DATETIMEOFFSET';

This comment has been minimized.

This comment has been minimized.

@szabolcsmaj

szabolcsmaj Apr 29, 2018
Author Contributor

Sorry for the mixup and confusion: I started doing changes for a project of ours in the first place. The PR contained the initial changes we needed but we went further. The mistake was that I forgot that if I commit and push the new changes, this PR will also be updated.

Moved the new -and unrelated to this PR- changes to a different branch and reverted the changes you questioned.

};

DATE.prototype._stringify = function _stringify(date) {

This comment has been minimized.

This comment has been minimized.

@szabolcsmaj

szabolcsmaj Apr 29, 2018
Author Contributor

Same applies to this comment as I previously mentioned.

Copy link
Contributor

@sushantdhiman sushantdhiman left a comment

Some unrelated DATE changes in PR needs to be removed

@sushantdhiman sushantdhiman merged commit e2bfa3b into sequelize:master Apr 30, 2018
4 checks passed
4 checks passed
@codecov
codecov/patch 100% of diff hit (target 95.94%)
Details
@codecov
codecov/project 95.94% (+0%) compared to 7c81b96
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants