MySQL doesn't work with foreign keys

This was previously fixed in e84799d but broken in 3f596f8. This commit
reintroduced the conditional that prevents the foreign keys from being
added to MySQL databases.
Merge pull request #15951 from pcreux/fix-mysql-test-fk

MySQL doesn't work with foreign keys