Revert "Revert "change before_migrate""

This reverts commit c60c29848ecaec65fec67d3f66b66a184051b14f.
deploy hooks