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

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 April 21, 2018 22:18
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 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';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same applies to this comment as I previously mentioned.

Copy link
Contributor

@sushantdhiman sushantdhiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some unrelated DATE changes in PR needs to be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants