pre and post migration callbacks