Added hooks to execute code before and after schema migration