-
Notifications
You must be signed in to change notification settings - Fork 296
Description
Is your feature request related to a problem? Please describe.
I am writing a web application using Next.js and typescript. I have a private
schema for my backend with a table note
, I ran the supabase gen types
command with the -s
flag, but when i want to use the table type in my logic, it was resolved as unknown
type:

When I try to debug, I found this line in the generated file:
type PublicSchema = Database[Extract<keyof Database, "public">];
When I change "public"
to "private"
, the table type can be referred.
It seems that only the tables from the public
schema can be referred, it would be much better if tables from all schemas can be referred, especially when the schema(s) is/are specified when generating the types.
Describe the solution you'd like
The correct table (and enum) type of all the generated schemas should be able to be referred, especially when the schema(s) is/are specified when generating the types.
Describe alternatives you've considered
Mentioned the expected outcome and/or any alternate solution in the document of the CLI
Additional context
N/a