How to change all columns from one type to another, changing all FK columns as well?
This might work:


(backup db just in case)
DISABLE FKs.
Using a suitable SELECT into information_schem.columns, construct the ALTER TABLE statements.
Enable FKs.