migrate should not be in python application block