fix-postgres-alter-default-references by harshang03 · Pull Request #18124 · sequelize/sequelize · GitHub
Skip to content

fix-postgres-alter-default-references#18124

Draft
harshang03 wants to merge 1 commit intosequelize:mainfrom
harshang03:fix/postgres-alter-default-references-11048
Draft

fix-postgres-alter-default-references#18124
harshang03 wants to merge 1 commit intosequelize:mainfrom
harshang03:fix/postgres-alter-default-references-11048

Conversation

@harshang03
Copy link
Copy Markdown

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 Changes

issue #11048.
Fix Postgres changeColumn SQL generation when a column has both DEFAULT and REFERENCES. The previous parsing would include the REFERENCES clause in the SET DEFAULT fragment, producing invalid SQL like SET DEFAULT 1 REFERENCES ....
This change splits DEFAULT and REFERENCES into separate valid ALTER TABLE statements and adds a regression test for the combined case.

List of Breaking Changes

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 22, 2026

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.

1 participant