Dari
Explore posts from serversDTDrizzle Team
•Created by Dari on 10/11/2024 in #help
Resolved: Need help with my multi column primary and foreign key table
Setup:
Hey I have created this table:
12 replies
DTDrizzle Team
•Created by Dari on 9/20/2024 in #help
Using function in "and" instead of dynamic query
Hey i was wondering if this would work or if there would be any downsides
This is a simplified example. I prefered writing it like this instead of a dynamic query because i prefer its readability.
But I'm not sure if I might run into issues with this. For now the code seems to work.
Any suggestions?
Im using turso as my db (sqlite aka libsql to be more precise).
Thanks for your help 🙂
1 replies
DTDrizzle Team
•Created by Dari on 7/3/2024 in #help
Drizzle Push to Turso fails on third attempt
If I use drizzle push on an empty turso db the first push works fine. (command: "pnpm db:push")
After that if I run push again, it thinks that the schema doesn't match and it applies some changes.
On the third db:push attempt it tries to do the changes again but this time it fails and it leaves the db in an "broken" state. (Because It has some _old tables left and the new ones are missing the values of the _old one.)
I see two issues here.
1) Drizzle kit sees schema changes which are actually not there.
2) Drizzle kit is not pushing in a transaction and on error it is not getting rolled back
Does anybody else have this issue / a solution?
Here is a link to a minimal repo: https://github.com/Cuhadari-Deniz/testing-drizzle-turso
drizzle-orm: 0.30.10
drizzle-kit: 0.21.4
@libsql/client: 0.6.0
3 replies