You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 tablenote
, I ran thesupabase gen types
command with the-s
flag, but when i want to use the table type in my logic, it was resolved asunknown
type:When I try to debug, I found this line in the generated file:
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
The text was updated successfully, but these errors were encountered: