Bug #19433 deleting foreign key deletes column in child table
Submitted: 29 Apr 2006 9:59 Modified: 29 Apr 2006 18:36
Reporter: matthew heald (Candidate Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench Preview Severity:S2 (Serious)
Version:1.0.6 beta OS:Windows (Win XP SP2)
Assigned to: CPU Architecture:Any

[29 Apr 2006 9:59] matthew heald
Description:
trying to delete a foreign key, eventually managed to do it after a lot of clicking on and around the key definition. delete the fk with a right click | delete. however doing that also deleted the column in the referencing / child table.

How to repeat:
create a foreign key
then attempt to delete by selecting the fk description
right clik then select delete
[29 Apr 2006 16:47] matthew heald
just noticed that after the column is deleted the index definition remains referring to a column which is no longer in the tabel defintion. looks like a consistency check error.

I'd have expected that if the columnis deleted it would also be removed in the index definition, OR a warning would have been raised.
[29 Apr 2006 18:36] MySQL Verification Team
Thank you for the bug report.
[30 Apr 2006 12:58] John Yodsnukis
Perhaps it should be optional that the foreign key column(s) are deleted when a relationship is deleted?
[3 May 2006 19:15] Stephen
Making the dropping of the foreign key column optional when deleting the key relationship would be ideal.  I've been trying to find a way to do this to no avail.
[5 May 2006 15:20] MySQL Verification Team
Please see also bug: http://bugs.mysql.com/bug.php?id=18773.