Custom addon upgrade


I have developed my custom addon. When I was updating an addon during the local development I used uninstall and install again to apply the new changes to database and so on.

Now I want to install the addon to our remote test env(pre production), but before that I want to know how to upgrade the addon without the need of re-installing it and lost all the data. After reading through the docs, this forum and help of Chat GPT I am still not able to do it. Currently I can just export the addon files using the cscart-sdk addon:export, zip it and install it the “unsafe way” without reinstalling or “safe way” with re-installing. I can not figure out how to do just the upgrade really.

What if I need to do e.g. the migration of database in the upgrade, how to do it?

I am using the cs-cart multivendor 4.17.1


Please check Upgrade Center: How it Works — CS-Cart 4.17.x documentation and also consider using repository for developing and maintaining code

And this one article:

Thank you for these resources!