Lots of type issues after running introspection.

Decided to finally give Drizzle a spin and run introspection on my database to automatically generate the models. But I got loads of type errors that say "Argument of type 'string' is not assignable to parameter of type 'number | SQL<unknown>'.ts(2345)" And this is because of lines like this: version: int("version").default('NULL') How should I fix these & why did this happen in the first place?
1 Reply
Makistos
Makistos5mo ago
Ok, is introspection a tool supposed to be used or some long-ago abandoned one I should forget about? Not only did it create an obviously invalid schema with not one but two types of errors but after fixing those Studio still can't work with it. Interface shows how it has read the schema, but if I try to do any simple query Studio either crashes or tells me that table does not exist (even though clearly it does in the schema Studio says it read). So should I just forget about auto-generating the schema for my ~50 table database and do it by hand?
Want results from more Discord servers?
Add your server