Ensure that migrations are run in correct order.