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

fix(tinyint): ignore params for TINYINT on postgres #9992

Merged
merged 2 commits into from Oct 5, 2018

Conversation

@t-bonatti
Copy link
Contributor

@t-bonatti t-bonatti commented Oct 4, 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)?
  • 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?
  • 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?

Description of change

Proposal to fix #9738.
Postgres don't have type TINYINT.
With this PR the mesage error is more clear when use TINYINT.UNSIGNED. It's same when use TINYINT

From:
ERROR: syntax error at or near "UNSIGNED"

To:
type "tinyint" does not exist

@sushantdhiman what do you think?

@codecov
Copy link

@codecov codecov bot commented Oct 4, 2018

Codecov Report

Merging #9992 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9992      +/-   ##
==========================================
+ Coverage   96.38%   96.39%   +<.01%     
==========================================
  Files          63       63              
  Lines        9389     9400      +11     
==========================================
+ Hits         9050     9061      +11     
  Misses        339      339
Impacted Files Coverage Δ
lib/dialects/postgres/data-types.js 97.96% <100%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9508888...20c3efe. Read the comment docs.

Copy link
Contributor

@sushantdhiman sushantdhiman left a comment

SMALLINT, TINYINT, BIGINT, INTEGER, DOUBLE and REAL share lots of duplicate code, it will be better to refactor it somehow. But that is not required in this PR, please just fix small typo and I will merge this

if (!(this instanceof TINYINT)) return new TINYINT(length);
BaseTypes.TINYINT.apply(this, arguments);

// POSTGRES does not support any parameters for bigint

This comment has been minimized.

@sushantdhiman

sushantdhiman Oct 5, 2018
Contributor

// POSTGRES does not support any parameters for tinyint

@t-bonatti
Copy link
Contributor Author

@t-bonatti t-bonatti commented Oct 5, 2018

@sushantdhiman sushantdhiman merged commit 9f58b82 into sequelize:master Oct 5, 2018
4 checks passed
4 checks passed
@codecov
codecov/patch 100% of diff hit (target 96.38%)
Details
@codecov
codecov/project 96.39% (+<.01%) compared to 9508888
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sushantdhiman
Copy link
Contributor

@sushantdhiman sushantdhiman commented Oct 5, 2018

Thanks @t-bonatti

@t-bonatti t-bonatti deleted the t-bonatti:feature-9738 branch Oct 11, 2018
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.

2 participants