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 4acbeb9371Fixes#4826
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>