© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
17 replies
helloworld1_1

Type inference breaking in drizzle-orm 0.32.0 ?

I am trying to update a column called 'isEmailVerified'but TS keeps telling me that 'isEmailVerified' doesn't exist in the schema. Everything used to work fine in the previous version.

 const updatedUserId: { updatedId: number }[] = await this.db
        .update(users)
        .set({ isEmailVerified: true })
        .where(eq(users.email, email))
        .returning({ updatedId: users.id });
 const updatedUserId: { updatedId: number }[] = await this.db
        .update(users)
        .set({ isEmailVerified: true })
        .where(eq(users.email, email))
        .returning({ updatedId: users.id });


My schema is the following :

export const users = pgTable('users', {
  id: serial('id').primaryKey(),
  email: varchar('email').unique().notNull(),
  firstName: varchar('first_name').notNull(),
  lastName: varchar('last_name').notNull(),
  password: varchar('password').notNull(),
  phone: varchar('phone'),
  roleId: integer('role_id').references(() => userRoles.id),
  isEmailVerified: boolean('is_email_verified').default(false),
  createdAt: timestamp('created_at').defaultNow(),
});
export const users = pgTable('users', {
  id: serial('id').primaryKey(),
  email: varchar('email').unique().notNull(),
  firstName: varchar('first_name').notNull(),
  lastName: varchar('last_name').notNull(),
  password: varchar('password').notNull(),
  phone: varchar('phone'),
  roleId: integer('role_id').references(() => userRoles.id),
  isEmailVerified: boolean('is_email_verified').default(false),
  createdAt: timestamp('created_at').defaultNow(),
});


For some reason, it only sees columns that have 'notNull' constraint.
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

Type Inference Issue: Missing | null on Relational Fields in Drizzle ORM
Drizzle TeamDTDrizzle Team / help
13mo ago
0.32.0 introduces unmentioned breaking change
Drizzle TeamDTDrizzle Team / help
17mo ago
Drizzle ORM not updating type
Drizzle TeamDTDrizzle Team / help
2y ago
Latest drizzle-orm 0.37.0 break drizzle-zod
Drizzle TeamDTDrizzle Team / help
15mo ago