Skip to content

feat(oracle): add width support for numerictype#16073

Merged
WikiRik merged 2 commits intosequelize:v6from
hjamil-24:v6
Jun 1, 2023
Merged

feat(oracle): add width support for numerictype#16073
WikiRik merged 2 commits intosequelize:v6from
hjamil-24:v6

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

Adding precision and scale to numeric datatypes (INTEGER and DECIMAL).

INTEGER

If width is provided:
id: { type: Sequelize.INTEGER(3) //width provided },
will generate ID NUMBER(3,0)
If width is not provided:
id: { type: Sequelize.INTEGER //width not provided },
will generate ID INTEGER

SMALLINT

If width is provided:
id: { type: Sequelize.SMALLINT(3) //width provided },
will generate ID NUMBER(3,0)
If width is not provided:
id: { type: Sequelize.SMALLINT //width not provided },
will generate ID SMALLINT

DECIMAL

If precision and scale is provided:
id: { type: Sequelize.DECIMAL(3,2) },
will generate ID NUMBER(3,2)
If precision and scale is not provided:
id: { type: Sequelize.DECIMAL },
will generate ID NUMBER
If only precision is provided:
id: { type: Sequelize.DECIMAL(10) },
will generate ID NUMBER(10)

@WikiRik
Copy link
Copy Markdown
Member

WikiRik commented Jun 1, 2023

I'll slowly merge the 4 oracle PRs today and then trigger the release for a new version, just fyi

@ephys ephys changed the title feat(oracle): added width support for numerictype feat(oracle): add width support for numerictype Jun 1, 2023
@WikiRik WikiRik merged commit af4f0ae into sequelize:v6 Jun 1, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 1, 2023

🎉 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