[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
I keep getting this error when i run drizzle-kit push.
I dont know if it has anything to do with my schema
8 Replies
Schema
@migs same issue as you apparently
good catch that you found out it was the references
i removed mine nad it worked
however, after pushing. When i uncommented the references. I keep getting the same error
Don't know if it's just with sqlite/turso but lately I've been having a lot of problems with migrations
i found out
its not documented
but
if you do references, you need to also define the relation
take a look at this
GitHub
drizzle-orm-course/src/db/schema.ts at main · vahid-nejad/drizzle-o...
Contribute to vahid-nejad/drizzle-orm-course development by creating an account on GitHub.
Maybe this is why its causing the issue ? I am still defining the relations in my schema, will test tomorrow if it works
We might have different problems, if you check my thread, I have also defined the relations with the drizzle api
i lost ur thread, can you ping me