Closed kwadwoatta closed 1 month ago
@kwadwoatta most probably you have circular FK references, that's why when you turn on the "noImplicitAny": true
and you're able to see the no implicit any
errors in your schema file(s).
this means, insertion in your table is not possible or not safe, sooner or later you're gonna have issues deleting records I guess, I think you have two options:
nullable
, you get the types back, but then brings us back to the deletion issue, which means you have constraints on both side of the relations, so you can just delete them directly, you have to make one of them null
and then remove them. hope it helps ;) cheers
@TheMichio you were right! Thank you!!
What version of
drizzle-orm
are you using?0.33.0
What version of
drizzle-kit
are you using?0.24.2
Describe the Bug
package.json (relevant parts)
Steps Taken
"strict": true
intsconfig.json
as suggested in another issue for drizzle-orm 0.33.0.true
andfalse
, but none resolved the issue.noImplicitAny
is set totrue
, I get errors in my schema definition stating that mypgTable
s are implicitly returningany
. This only occurs after the firstpgTable
I've defined.Current Issues
select
operations orquery
s.Additional Context
These issues were not present in an older NestJS project built with drizzle-orm (0.30.8) and drizzle-kit (0.20.17): https://github.com/kwadwoatta/purshew.
Questions
Any assistance or insights would be greatly appreciated.
Expected behavior
Correct type inference
Environment & setup
tsconfig.json
package.json (relevant parts)