Hooks run after app update and migrate & how to make a patch for custom app

I have my custom app installed on my erpnext instance.
After a few times of usage, I realize that in my method that being called in hooks.py after_install, I should add some custom doctypes.

Everything goes well if I install my new version custom app into a new fresh site.
But, why it seems not run when I update/migrate my existing site?

Is there a way how to let all the changes i made in the hooks can be executed when I do bench migrate to my existing site?

Call the methods you need in an after_magrate hook… that will be run after migrate

1 Like

i see… thanks vijaywm