Significantly improved stability and performance of applying and rolling back migrations