Skip to content

fix(typegen): omit generated columns from Insert and Update types - #1105

Open
daviddallakyan2005 wants to merge 1 commit into
supabase:masterfrom
daviddallakyan2005:fix/typegen-generated-columns
Open

fix(typegen): omit generated columns from Insert and Update types#1105
daviddallakyan2005 wants to merge 1 commit into
supabase:masterfrom
daviddallakyan2005:fix/typegen-generated-columns

Conversation

@daviddallakyan2005

@daviddallakyan2005 daviddallakyan2005 commented Aug 14, 2026

Copy link
Copy Markdown

Fixes #838

Stored GENERATED ALWAYS AS … STORED columns are not writable, but TypeScript typegen only excluded identity-ALWAYS columns. is_generated is already populated by column introspection; Insert/Update now treat it the same way and emit field?: never, while the column remains on Row. Go, Swift, and Python generators are separate and still include generated columns — this PR is TypeScript-only.

How to test

npm install
npm test

npm test starts Postgres via test/db/docker-compose.yml (Docker required) and runs Vitest. Use Node 22 (.nvmrc). The new assertion is typegen: typescript omits generated columns from Insert and Update against fixture table public.people.

Stored GENERATED columns are not writable, but TypeScript typegen only
excluded identity-ALWAYS columns. Treat is_generated the same way.
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.

Remove generated columns from Insert/Update types

1 participant