TypeError: columnType.startsWith is not a function
I am using PlanetScale and am interested in using
npx drizzle-kit push
to prototype my schema. I am using the latest "drizzle-orm": "^0.29.4"
and "drizzle-kit": "^0.21.2"
. I completely cleared my database and ran npx drizzle-kit push
with no problem. However on subsequent calls (without changing anything), I consistently run into this error
There seems to be a type error that occurs during Introspection.
PS. I am passing an instance of the planetscale Client, so I am also confused as to why I am getting this warning.
Any support would be greatly appreciated! Thank you!2 Replies
I was able to fix it by switching to
"drizzle-kit": "^0.21.1
, then, I encountered the error in which it was trying to drop all the primary keys and readd them, so I used this fix https://github.com/drizzle-team/drizzle-orm/issues/1428#issuecomment-1916722940, and that workedGitHub
[BUG]: ER_WRONG_AUTO_KEY - Drizzle Kit not detecting primary keys ·...
What version of drizzle-orm are you using? 0.28.6 What version of drizzle-kit are you using? 0.19.13 Describe the Bug Drizzle-kit isn't introspecting the correct primary keys from planet scale....
I still can't use
.unique
though without running into issues. I will make a seperate thread for that though: https://discordapp.com/channels/1043890932593987624/1240321768825294988