Skip to content

fix: preserve identity generation when it is omitted from column updates - #1116

Open
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/column-update-preserves-identity-generation
Open

fix: preserve identity generation when it is omitted from column updates#1116
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/column-update-preserves-identity-generation

Conversation

@hsusul

@hsusul hsusul commented Aug 24, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix.

Why?

columns.update defaulted identity_generation to 'BY DEFAULT'. The in-file state table says that omitting it on an existing identity column should emit no SET GENERATED, but the default made that branch unreachable. A comment-only PATCH therefore rewrote GENERATED ALWAYS to BY DEFAULT.

POST /columns still defaults omitted generation to BY DEFAULT (#77).

Fixes #1114.

How?

Remove the update-path default. Keep SET GENERATED only when identity_generation is provided. When adding identity, fall back to BY DEFAULT if generation is omitted.

Checklist

  • Bug fix
  • Tests added
  • Docs
  • Breaking change

The update default of BY DEFAULT made SET GENERATED fire on unrelated PATCHes.
@hsusul
hsusul requested review from a team, avallete and soedirgo as code owners August 24, 2026 16:56
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.

PATCH /columns rewrites GENERATED ALWAYS identity to BY DEFAULT when identity_generation is omitted

1 participant