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

Add bulk versions of all constraint management for Postgres #51708

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented May 1, 2024

Motivation / Background

I've been doing a lot with migrations and Postgres, and noticed that when do a bulk table change, all the constraint-related management was running as separate statements, when it could all be run as part of a single ALTER TABLE.

Detail

This PR implements bulk versions of add and remove for foreign keys, check constraints, exclusion constraints, and unique constraints.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

I'm not sure if this qualifies as a large enough behavior change to warrant a CHANGELOG entry.

@ccutrer ccutrer force-pushed the bulk_postgres_constraints branch from 5fc953f to 99a56d7 Compare May 2, 2024 01:51
@fatkodima
Copy link
Member

Did some implementation for check constraints before - #45208.

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

Successfully merging this pull request may close these issues.

None yet

2 participants