Drizzle TeamDT
Drizzle Team•10mo ago
CS

TypeScript suddenly not working anymore

So I was refactoring my Project, to be able to share Drizzle/DB code between two NestJS APIs - so far working fine.
But when pulling over the parts of the code that updated data in tables, I started noticing problems:

export const userBusinessDetails = mysqlTable("user_business_details", {
  ...abstractFields(),
  user: varchar("user", { length: 36 })
    .notNull()
    .references(() => users.id)
    .unique(), // one user can have only one business info record
  about: text("about"),
  termsAndConditions: text("terms_and_conditions"),
  privacyPolicy: text("privacy_policy"),
  termsOfRevocation: text("terms_of_revocation"),
  moreInfo: text("more_info"),
  taxNumber: varchar("tax_number", { length: 50 }),
  businessName: varchar("business_name", { length: 100 }),
});


-> See related pic

For some reason, on db.update(tableName).set(...values), Drizzle suddenly doesn't rrecognize all the fields anymore?
I'm really not sure what to do at this point. Things I've tried: restart VS Code, restart TS language server, try different import/export paths, etc.

If anybody knows why this issue might arise, please let me know. 👋
image.png
Was this page helpful?