notNull and Unique
Hi
Whenever I use push:db I get that I am about to add a new unique constraint. I then checked and I don’t actually have the unique constraints set.
Am I doing something wrong?
"drizzle-kit": "^0.24.2",
4 Replies
i learned one here i just use generate and migrate
never push again for me 😄
I have no idea why I am not getting the name as a unique index? Works fine for my other tables.
Moving unique() to the end fixed it:
name: varchar('name', { length: 255 }).notNull().unique(),
Well that added the unique constraint. But it still complaints about I’m about to add a new unique constraint.
https://github.com/drizzle-team/drizzle-orm/issues/2599 This seems to be the issue.
GitHub
[BUG]: Unique key reconciliation with upstream schema is inconsiste...
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...