migration.py in pythonic look