Property notNull does not exist on type 'PgEnum<[google, github]>

Hey guys, for some reason Im getting this error. any clue how I could fix this?
No description
2 Replies
Icemourne
Icemourne12mo ago
This is correct usage
export const provider = pgEnum("providerEnum", ...)
{
...,
provider: provider("provider").notNull(),
...
}
export const provider = pgEnum("providerEnum", ...)
{
...,
provider: provider("provider").notNull(),
...
}
It has to create enum in DB separately that why provider fn is exported and that enum is then referenced in tables column
Smileyface
SmileyfaceOP12mo ago
gotcha. that works perfectly thanks!

Did you find this page helpful?