Update pre-migration.py

Add decorator