mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 05:15:49 +03:00
[GH-ISSUE #48] Deleting foreign key constraints, wrong order and invalid syntax #171
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/DBDiff#171
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ptmrio on GitHub (May 15, 2017).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/48
When deleting foreign key constraints, two error appear:
DBDiff tries to delete the index key first and then to drop the constraint. But as MySQL still uses the constraints, it can't drop the key.
Wrong Syntax for dropping the constraint, see: http://stackoverflow.com/questions/14122031/how-to-remove-constraints-from-my-mysql-table
Example: create two tables and add a foreign key, create dbdiff and see what' wrong.
ALTER TABLE order ADD FOREIGN KEY ( user_id ) REFERENCES user( id )(great work else, love the script, helps me save a lot of time.)
@jasdeepkhalsa commented on GitHub (Nov 24, 2017):
Similar to Issue #41. We will clean this up as part of the same feature that solves #41