You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I run drizzle-kit push against PlanetScale, drizzle drops and recreates primary key constraints, foreign key constraints, unique constraints etc. and keeps running into issues doing so. I've created a minimal example to illustrate the issue. In this example, the first drizzle-kit push goes through, all subsequent pushes throw an error without even changing the schema at all.
DROP INDEX `unique_name` ON `table1`;
ALTER TABLE `table1` ADD CONSTRAINT `unique_name` UNIQUE(`table2_id`,`name`);
Cannot drop index 'unique_name': needed in a foreign key constraint (errno 1553)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Whenever I run drizzle-kit push against PlanetScale, drizzle drops and recreates primary key constraints, foreign key constraints, unique constraints etc. and keeps running into issues doing so. I've created a minimal example to illustrate the issue. In this example, the first drizzle-kit push goes through, all subsequent pushes throw an error without even changing the schema at all.
Beta Was this translation helpful? Give feedback.
All reactions