Cannot drop index 'PRIMARY' - planetscale
when I try to push to planetscale I get the error:
In order to successfully push I need to drop all the tables before pushing. I'm using the
Foreign key constraints
Beta at planetscale. When running push with the verbose flag, i see the following:
I'm running drizzle-kit": 0.20.13
.
my tables:
3 Replies
I suspect there may be an issue with how drizzle-kit and planetscale interfaces. When I run
pnpm drizzle-kit push:mysql --config=drizzle.config.ts
immediately after a successful push, it wants to perform the following action, even though there are no schema changes.
for anyone searching for the same, this patch worked for me:
https://github.com/drizzle-team/drizzle-orm/issues/1428#issuecomment-1916722940
would be great to have an official fix for this though!
GitHub
[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....
Thank you so much! This has been incredibly helpful