Open skusez opened 1 year ago
I think we need to use something like this for MySQL if you are using foreign keys. I don't think PlanetScale supports them.
ALTER TABLE MyTable DROP FOREIGN KEY IF EXISTS MyTable_MyKey_key;
ALTER TABLE MyTable DROP INDEX IF EXISTS MyTable_MyKey_key;
What version of
drizzle-orm
are you using?0.28.1
What version of
drizzle-kit
are you using?0.19.12
Describe the Bug
The ORM attempts to do the following:
ALTER TABLE
MyTableDROP CONSTRAINT
MyTable_MyKey_key``whereas it should be executing this:
ALTER TABLE
MyTableDROP INDEX
MyTable_MyKey_key``This is preventing pushes to the DB and errors in the console.
Expected behavior
Key should be dropped and drizzle-kit should push without issues.
Environment & setup
Planetscale DB connection in node.js 18 environment