Skip to content

fix(oracle): reordered check constraint for unsigned numeric type - #16074

Merged
WikiRik merged 3 commits into
sequelize:v6from
hjamil-24:checkConstraint
Jun 1, 2023
Merged

WikiRik merged 3 commits into
sequelize:v6from
hjamil-24:checkConstraint

Conversation

@hjamil-24

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description Of Change

Due to introduction of precision in Sequelize.Datatype.INTEGER, setting UNSIGNED options leads to generation of illegal oracle SQL statement.
This change is fix for the above mentioned issue.
For a field intCol: {type: Sequelize.Datatype.INTEGER.UNSIGNED, allowNull: false, defaultValue: 0}
SQL snippet generated before: "intCol" INTEGER check("intCol" >= 0) DEFAULT 0 NOT NULL //error thrown
SQL snippet generated after the change: "intCol" INTEGER DEFAULT 0 NOT NULL check("intCol" >= 0)

@WikiRik
WikiRik merged commit 5c8250e into sequelize:v6 Jun 1, 2023
@github-actions

github-actions Bot commented Jun 1, 2023

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants