We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drizzle-orm
0.28.1
drizzle-kit
0.19.12
The ORM attempts to do the following:
ALTER TABLE MyTableDROP CONSTRAINTMyTable_MyKey_key``
ALTER TABLE
DROP CONSTRAINT
whereas it should be executing this:
ALTER TABLE MyTableDROP INDEXMyTable_MyKey_key``
DROP INDEX
This is preventing pushes to the DB and errors in the console.
Key should be dropped and drizzle-kit should push without issues.
Planetscale DB connection in node.js 18 environment
The text was updated successfully, but these errors were encountered:
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;
Source: https://stackoverflow.com/a/18317774
Sorry, something went wrong.
I'm also experiencing the same issue now. Foreign Keys are being supported by PlanetScale, the feature is currently in beta.
Was fixed in [email protected]
[email protected]
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: