Error With types from Drizzle

Since i upgraded to latest version of drizzle i am not getting any types and alot of errors. Example:
Property 'config' is protected but type 'Column<T, TRuntimeConfig, TTypeConfig>' is not a class derived from 'Column<T, TRuntimeConfig, TTypeConfig>'
Property 'config' is protected but type 'Column<T, TRuntimeConfig, TTypeConfig>' is not a class derived from 'Column<T, TRuntimeConfig, TTypeConfig>'
drizzle-orm: "0.36.3" drizzle-kit: "0.28.1" Introspected the schema and relation files from db. example:
export const users = pgTable(
'users',
{
archived: boolean().default(false).notNull(),
externalId: text('external_id').notNull(),
id: uuid()
.default(sql`uuid_generate_v4()`)
.primaryKey()
.notNull(),
language: language().notNull(),
name: text().notNull(),
type: userType().notNull(),
updatedAt: timestamp('updated_at', { mode: 'string' }),
},
(table) => {
return {
uqExternalId: unique('uq_external_id').on(table.externalId),
usersExternalIdKey: unique('users_external_id_key').on(table.externalId),
}
},
)
export const users = pgTable(
'users',
{
archived: boolean().default(false).notNull(),
externalId: text('external_id').notNull(),
id: uuid()
.default(sql`uuid_generate_v4()`)
.primaryKey()
.notNull(),
language: language().notNull(),
name: text().notNull(),
type: userType().notNull(),
updatedAt: timestamp('updated_at', { mode: 'string' }),
},
(table) => {
return {
uqExternalId: unique('uq_external_id').on(table.externalId),
usersExternalIdKey: unique('users_external_id_key').on(table.externalId),
}
},
)
What could be going wrong? Can anyone help?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server