mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
added CLI example for generating types with self-hosted instance
Docs Update. Added a example for generating types with self-hosted instance. Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
This commit is contained in:
1 parent
c159a2d964
commit
e1b51dff81
1 file changed
+6
@@ -46,6 +46,12 @@ or in case of local development:
|
||||
npx supabase gen types typescript --local > database.types.ts
|
||||
```
|
||||
|
||||
or in case of a self-hosted instance (see [Accessing Postgres](/docs/guides/self-hosting/docker#accessing-postgres) for more information):
|
||||
|
||||
```bash
|
||||
npx supabase gen types typescript --db-url postgres://postgres.[POOLER_TENANT_ID]:[POSTGRES_PASSWORD]@[your-domain-or-ip]:5432/postgres --schema public > database.types.ts
|
||||
```
|
||||
|
||||
These types are generated from your database schema. Given a table `public.movies`, the generated types will look like:
|
||||
|
||||
```sql
|
||||
|
||||
Reference in new issue
Block a user