Duplicate statements after adding .unique()
Starting from a schema that is entirely synced, I add one
.unique()
constraint on one of my columns, then run drizzle-kit push
and I get the following
This will throw InvalidArgument desc = Duplicate key name 'MailingList_email_unique' (errno 1061) (sqlstate 42000)
when trying to execute the second statement, but it will at least add it.
Now that the key exists, on subsequent calls (without changing anything) it will try to remove it and add it again!
I am using "drizzle-kit": "^0.21.1"
and "drizzle-orm": "^0.30.10"
and PlanetScale (MySQL).
Any support would be greatly appreciated!
Thank you.1 Reply
I think i'm getting a similar issue here - have raised a bug in github
https://github.com/drizzle-team/drizzle-orm/issues/2599
GitHub
[BUG]: · Issue #2599 · drizzle-team/drizzle-orm
What version of drizzle-orm are you using? 0.31.2 What version of drizzle-kit are you using? 0.22.8 Describe the Bug Unique keys aren't able to be reconciled properly using Drizzle with PlanetS...