sqliteTable infer optional vs required fields
I am trying to create optional fields on my model but no matter what I do the drizzle is inferring all the properties as required. See the example below:
Is there any way to achieve expected behaviour with the drizzle orm?
6 Replies
👋 Can you share your ts config?
Check if you have
strict
to trueSeems that
strict
is unrelated to this since it is used for push
as stated here: https://orm.drizzle.team/kit-docs/config-reference#strict
Nevertheless this is my config:
Also here are my drizzle versions:
Drizzle ORM - Config Reference
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
oh sorry I mean
strict
in your tsconfig file
Perfect! That's exactly what I was missing.
Thank you very much.
Do I mark this thread as resolved now or something?
Yeah if you want!