Sort migrations by version