Skip to content

Remove generated columns from Insert/Update types #838

Open
@dreinon

Description

@dreinon

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When creating a generated column, it is treated as a regular column in the Studio UI but also when generating TS types. It should be removed from Insert/Update types.

To Reproduce

  1. Create table with generated column:
CREATE TABLE people (
    ...,
    height_cm numeric,
    height_in numeric GENERATED ALWAYS AS (height_cm / 2.54) STORED
);
  1. Setup a CLI and generate types.

Expected behavior

Generated columns do not appear in Insert/Update types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions