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 try to use the generatedAlwaysAsIdentity() function on the id column from users, TypeScript presents the following type compatibility error
The types of '_.inferInsert' are incompatible between these types.
Type '{ name: string; }' has no properties in common with type '{ id?: number | undefined;
Apparently, the type PgTableWithColumns from Drizzle enforces that the id property should exist on $inferInsert type as well, even though it's not necessary since we don't insert users via Lucia.
Workaround:
const adapter = new DrizzlePostgreSQLAdapter(
db,
sessionTable,
userTable as PostgreSQLUserTable,
);
The text was updated successfully, but these errors were encountered:
Package
@lucia-auth/session-drizzle
Describe the bug
When I try to use the
generatedAlwaysAsIdentity()
function on theid
column from users, TypeScript presents the following type compatibility errorExample code:
Apparently, the type
PgTableWithColumns
from Drizzle enforces that theid
property should exist on$inferInsert
type as well, even though it's not necessary since we don't insert users via Lucia.Workaround:
The text was updated successfully, but these errors were encountered: