change before_migrate
Revert "change before_migrate"

This reverts commit fc5f41e68ff0704b5819b5c1dd225e5200810f94.