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

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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