Skip to content

New constraint type in create_constraint: primary_key #698

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

Merged
merged 3 commits into from
Apr 15, 2025

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Feb 21, 2025

This PR adds a new constraint type to create_constraint named primary_key.
This new option lets you add a primary key constraint to existing tables.

@kvch kvch force-pushed the feature-create-constraint-primary-key branch from 3e22d40 to 921081f Compare April 4, 2025 12:48
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 12:48 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 12:56 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 13:01 Inactive
@kvch kvch force-pushed the feature-create-constraint-primary-key branch from 20e7490 to 13ab343 Compare April 4, 2025 14:00
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 14:00 Inactive
kvch added a commit that referenced this pull request Apr 8, 2025
Previously, `pgroll` could not backfill tables that did not have a
primary key or a unique column. From now on, `pgroll` can fallback onto
the internal column `_pgroll_needs_backfill` to find all columns that
has to be backfilled.

I also moved `CNeedsBackfillColumn` constant to the package `backfill`
because it makes more sense to have it there.

Required by #698
@kvch kvch force-pushed the feature-create-constraint-primary-key branch from 13ab343 to f080ef1 Compare April 8, 2025 11:13
@github-actions github-actions bot temporarily deployed to Docs Preview April 8, 2025 11:13 Inactive
@kvch kvch marked this pull request as ready for review April 8, 2025 11:17
@kvch kvch requested a review from exekias April 8, 2025 11:17
Copy link
Member

@exekias exekias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@kvch kvch merged commit 7f979fe into xataio:main Apr 15, 2025
30 checks passed
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.

2 participants