add before migrate to the prepare process