[ADD] adapt migrate.py for version 8.0