-
-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
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 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
hsuanxyz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working