Skip to content

fixed backfill for generating always identity columns - #1036

Open
codeafridi wants to merge 1 commit into
xataio:mainfrom
codeafridi:fixed-backfill
Open

fixed backfill for generating always identity columns#1036
codeafridi wants to merge 1 commit into
xataio:mainfrom
codeafridi:fixed-backfill

Conversation

@codeafridi

Copy link
Copy Markdown

fixes #1035

The backfill query used to update the primary key column to itself to fire triggers. PostgreSQL rejects that for GENERATED ALWAYS identity columns, so this now updates pgroll’s internal _pgroll_needs_backfill column instead.

Tests

  • go test ./pkg/backfill/...
  • go test ./pkg/migrations -run 'TestAlterColumnValidation/backfill_with_generated_always_identity_primary_key|TestAlterColumnValidation/backfill_with_multiple_primary_keys'

@github-actions
github-actions Bot temporarily deployed to Docs Preview May 26, 2026 14:25 Inactive
@codeafridi

Copy link
Copy Markdown
Author

please review @exekias

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.

GENERATED ALWAYS columns not supported for operation with backfill ?

1 participant