Ticket/12643 Fixes deletion of columns that have the target column as a prefix

https://tracker.phpbb.com/browse/PHPBB3-12643
Fixes deletion of columns that have the target column as a prefix (e.g. forum_posts and forum_posts_approved).
Fixes column changes when tables have certain constraints on them.