ensuring migrations are not executed if legacy tables do not exist