fixed issue when supplying custom log function; added delay after create in tests to ensure that the row has been fully created in the database before checking the last inserted migration