Skip to content

Add fallback method for backfilling records #779

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 5 commits into from
Apr 8, 2025

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Apr 4, 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

@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 12:47 Inactive
@kvch kvch force-pushed the feature-backfill-based-on-needs-backfill branch from dbdfc03 to bf0d0ad Compare April 4, 2025 13:15
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 13:15 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 14:01 Inactive
@kvch kvch force-pushed the feature-backfill-based-on-needs-backfill branch from ac748b3 to 7d194cf Compare April 4, 2025 14:10
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 14:10 Inactive
@kvch kvch force-pushed the feature-backfill-based-on-needs-backfill branch from 7d194cf to 953ce19 Compare April 4, 2025 14:33
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 14:33 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 14:42 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview April 4, 2025 14:52 Inactive
@kvch kvch requested a review from exekias April 4, 2025 14:57
"github.com/xataio/pgroll/pkg/backfill/templates"
"github.com/xataio/pgroll/pkg/db"
"github.com/xataio/pgroll/pkg/schema"
)

const CNeedsBackfillColumn = "_pgroll_needs_backfill"
Copy link
Member

Choose a reason for hiding this comment

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

a comment here would help

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.

great addition! would it be possible to add some tests for this case?

@github-actions github-actions bot temporarily deployed to Docs Preview April 8, 2025 10:16 Inactive
@kvch
Copy link
Contributor Author

kvch commented Apr 8, 2025

I added one more test and a comment.

@kvch kvch enabled auto-merge (squash) April 8, 2025 10:16
@kvch kvch merged commit bdf2e73 into xataio:main Apr 8, 2025
29 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