[ticket/13161] Avoid problems when running tests with different migrations

PHPBB3-13161
[ticket/13161] Check whether the schema exists, before deleting it

PHPBB3-13161