Skip to content

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

Merged
sushantdhiman merged 7 commits into
sequelize:masterfrom
GoodGrind:master
Apr 30, 2018
Merged

Case sensitive MS SQL database operations fail because of uppercase system table references#9337
sushantdhiman merged 7 commits into
sequelize:masterfrom
GoodGrind:master

Conversation

@szabolcsmaj

Copy link
Copy Markdown
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

codecov Bot commented Apr 21, 2018

Copy link
Copy Markdown

Codecov Report

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

inherits(DATE, BaseTypes.DATE);

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
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.

Comment thread lib/dialects/mssql/data-types.js Outdated
return 'DATETIME';
};

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

???

Copy link
Copy Markdown
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.

@sushantdhiman sushantdhiman left a comment

Copy link
Copy Markdown
Contributor

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

2 participants