In an unspecified case the schema state was not consistent with the
expected migration plans. This fix ignores two statements by checking
if a foreign key is here or not.
This issue may have been caused by a rewrite of an old migration,
probably through 4acbeb93717612f361627f7d4b946fcb4477823c
Fixes#4826
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>