-
Notifications
You must be signed in to change notification settings - Fork 346
Open
Description
Describe the bug
I have a database with 3 schemas, public, accounting and payment.
I get strange things when regenerating, a type with a payment schema using this CLI command.
npx supabase gen types typescript --project-id "changeyourprojectid" --schema payments > ./src/common/types/supabase-payments.ts
The CLI runs and generates, but when I want to use the type (Tables<'payments'>), it returns unknown.
I suspect this is because the publicSchema variable is still set to 'public' and that it should depend on the schema being generated.
To Reproduce
Steps to reproduce the behavior:
- Create 1 project with custom schema, e.g. payments
- Open your project, and run
npx supabase gen types typescript --project-id "changeyourprojectid" --schema payments > ./src/common/types/supabase-payments.ts
- supabase will regenerate supabase-payments.ts
- Then create a variable with type tables<'payments'>, it will produce unknown type.
Expected behavior
- Tipenya sesuai dengan yg column yg ada di table.
Screenshots
System information
Rerun the failing command with --create-ticket flag.
- Ticket ID: [e.g. ab1ac733e31e4f928a4d7c8402543712]
- Version of OS: [e.g. Ubuntu 22.04]
- Version of CLI: [e.g. v1.60.0]
- Version of Docker: [e.g. v25.0.3]
- Versions of services: [output from
supabase servicescommand]
Additional context
If applicable, add any other context about the problem here.
- Browser [e.g. chrome, safari]
- Version of supabase-js [e.g. v2.22.0]
- Version of Node.js [e.g. v16.20.0]
Metadata
Metadata
Assignees
Labels
No labels