[GH-ISSUE #17] Dropping foreign key columns #9

Open
opened 2026-02-25 21:33:01 +03:00 by kerem · 3 comments
Owner

Originally created by @majdzadeh on GitHub (Aug 9, 2016).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/17

Hi
When dropping foreign key columns using alter table statements, dbdiff uses "DROP CONSTRAINT". Instead, it should use "DROP FOREIGN KEY".

Originally created by @majdzadeh on GitHub (Aug 9, 2016). Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/17 Hi When dropping foreign key columns using alter table statements, dbdiff uses "DROP CONSTRAINT". Instead, it should use "DROP FOREIGN KEY".
Author
Owner

@jasdeepkhalsa commented on GitHub (Aug 25, 2016):

@majdzadeh Could you please explain the difference and implications for us so we're clear? Thanks

<!-- gh-comment-id:242387981 --> @jasdeepkhalsa commented on GitHub (Aug 25, 2016): @majdzadeh Could you please explain the difference and implications for us so we're clear? Thanks
Author
Owner

@djshen-ponddy commented on GitHub (Aug 29, 2016):

According to official documentation, to drop foreign keys we should use DROP FOREIGN KEY instead of DROP CONSTRAINT

<!-- gh-comment-id:243013433 --> @djshen-ponddy commented on GitHub (Aug 29, 2016): According to [official documentation](http://dev.mysql.com/doc/refman/5.7/en/alter-table.html), to drop foreign keys we should use `DROP FOREIGN KEY` instead of `DROP CONSTRAINT`
Author
Owner

@jasdeepkhalsa commented on GitHub (Nov 24, 2017):

This is be part of the same cleanup as #41

<!-- gh-comment-id:346872070 --> @jasdeepkhalsa commented on GitHub (Nov 24, 2017): This is be part of the same cleanup as #41
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#9
No description provided.