Before we proceed, here is useful blog post written by Peter on Hijacking Innodb Foreign Keys.
However, if you are trying to get rid of an unused Foreign Key (FK) constraint and related columns from versions older than mysql 5.6 or tables which cannot be executed with
ALTER TABLE ... ALGORITHM=INPLACE
because of limitations mentioned here (specifically tables with 5.5 TIMESTAMP formats), you can use pt-online-schema-change to drop such foreign keys.
For DROP FOREIGN KEY
with PT-OSC requires specifying
rather than the real
constraint_name …[Read more]