change before_migrate to before_restart.