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
When I create a JSONB column that is explicitly NOT NULL, I can see that null values are not allowed according to Supabase Studio (it understands the Postgres restriction exists).
When I generate Typescript types for this database, however, the Json type for this column allows null.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Create a non-nullable JSONB column
Run supabase gen types --lang=typescript
View the generated type for the column, which is Json
Expected behavior
I would expect the Typescript type for this column to be NonNullable<Json>.
Screenshots
(See above)
System information
OS: macOS
supabase: ^1.200.3
Node: v20
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
When I create a JSONB column that is explicitly NOT NULL, I can see that
null
values are not allowed according to Supabase Studio (it understands the Postgres restriction exists).When I generate Typescript types for this database, however, the
Json
type for this column allowsnull
.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
supabase gen types --lang=typescript
Json
Expected behavior
I would expect the Typescript type for this column to be
NonNullable<Json>
.Screenshots
(See above)
System information
The text was updated successfully, but these errors were encountered: