Foreign keys are causing me too many problems modifying an database structure to meet new requirements - I want to modify primary keys but it seems I can\'t when foreign key
You can simply issue the following command before any Alter Table statements you are going to make:
SET foreign_key_checks = 0;
This will turn off foreign key constraint checks for your database connection. You can then make your changes without needing to worry about constraints.
After you are done, don't forget to issue:
SET foreign_key_checks = 1;
To turn them back on.
Note that this will still not allow you to create a new foreign key constraint that would fail because the column data types don't match.