drizzle kit not migrating to turso properly
I have this little app with this schema
https://github.com/nevthereal/codoodle/blob/main/src/lib/server/db/schema.ts
And if I generate an sql file it will output something different, meaning not in the same order. First the posts table, then sessions and on the bottom users. I don't know if the order actually affects the migration, but i think it does.
When I run the migration I always get some libsql error with the code 500. Important to note: my db on turso was created with
--type schema
if this has any importance. but anyways. Always when I want to run the migration, I get this 500 error code:
if i then go to turso.tech/app to view the tables in their embedded drizzle studio i get this message:
Cannot read properties of undefined (reading 'id')
and if i use local drizzle studio, i only see the posts table.GitHub
codoodle/src/lib/server/db/schema.ts at main · nevthereal/codoodle
A SvelteKit blog with Turso. Contribute to nevthereal/codoodle development by creating an account on GitHub.
0 Replies