Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove generated columns from Insert/Update types #838

Open
2 tasks done
dreinon opened this issue Nov 29, 2023 · 1 comment
Open
2 tasks done

Remove generated columns from Insert/Update types #838

dreinon opened this issue Nov 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dreinon
Copy link

dreinon commented Nov 29, 2023

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.

@dreinon dreinon added the bug Something isn't working label Nov 29, 2023
@saltcod saltcod transferred this issue from supabase/supabase Nov 29, 2023
@S96EA
Copy link

S96EA commented Nov 30, 2023

It looks like we should add a filter for template?

@sweatybridge sweatybridge transferred this issue from supabase/cli Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants