add cleaning for pycache when deployement and adjust order in migration script