generate templates and run migration methods