Skip to content

Remove generated columns from Insert/Update types #838

Open

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.

Activity

  1. added
    bug
    on Nov 29, 2023
  2. transferred this issue fromsupabase/supabaseon Nov 29, 2023
  3. S96EA commented on Nov 30, 2023

    @S96EA

    It looks like we should add a filter for template?

  4. transferred this issue fromsupabase/clion Nov 15, 2024
  5. added a commit that references this issue on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions