Hi,
I'm using peewee.playhouse.migrate.drop_constraint to do some migrations on MySQL 8.0.18.
If failed with error message:
`Error in query (1064): Syntax error near 'CONSTRAINT `constraint_name`' at line 1`
I've checked the SQL.
This will fail:
ALTER TABLE xxx DROP CONSTRAINTS XXXALTER TABLE xxx DROP FOREIGN KEY XXX
Is there anything peewee can improve? Or configurations in MySQL I ignored?
Thanks for your help!
For MySQL you would use the drop_foreign_key_constraint migrator method.
I couldn't find it in peewee's documentation. Maybe could add it later. Thanks!
Oh, it's spent a lot of time to find drop_foreign_key_constraint method... It will be very usefull to add it to the docs.
The foreign-key constraint should be dropped automatically when dropping a foreign-key column.
Most helpful comment
I couldn't find it in peewee's documentation. Maybe could add it later. Thanks!