© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
8 replies
Julio Barros

jsonb field definition.

What's the right way to define a jsonb field? I have a type
type MetaData = {keywords?: string[];}
type MetaData = {keywords?: string[];}
and a field
meta: jsonb<MetaData>("meta")
meta: jsonb<MetaData>("meta")
, but I'm getting the typescript warnings
Type 'PgJsonbBuilderInitial<MetaData>'
Type 'PgJsonbBuilderInitial<MetaData>'
is not assignable to type
'AnyPgColumnBuilder'.ts(2322) 
'AnyPgColumnBuilder'.ts(2322) 
on the lhs and Type
'MetaData' does not satisfy the constraint 'string'.ts(2344)
'MetaData' does not satisfy the constraint 'string'.ts(2344)
on the rhs. Thanks in advance.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

JSONB field and zod validation
Drizzle TeamDTDrizzle Team / help
3mo ago
update a nested jsonb field
Drizzle TeamDTDrizzle Team / help
3y ago
Best way to query jsonb field
Drizzle TeamDTDrizzle Team / help
3y ago
Querying PG table by JSONB field
Drizzle TeamDTDrizzle Team / help
3y ago