How can one installation package replace another without uninstalling and reinstalling?
We want to use packages to make changes to Sugar instead of studio. That way we can track the changes in GITHUB.
How can one installation package replace another without uninstalling and reinstalling?
We want to use packages to make changes to Sugar instead of studio. That way we can track the changes in GITHUB.
For such cases I just keep the id and name of the package unchanged and increase the version number.
e.g. if the base package has:
$manifest = array(
'name' => 'myPackage',
'version => '202008100001'.
...);
$installdefs =array(
'id' => 'myPackage',
...);
I'll set the next package to:
'version => '202008100002'.
BUT BE AWARE, when doing so you cannot uninstall that package any more, the UNINSTALL button will disappear in module loader.
Harald Kuske
Principal Solution Architect – Professional Services, EMEA
hkuske@sugarcrm.com
SugarCRM Deutschland GmbH
If you're using Github already, another alternative to consider is using Pull Requests. Using packages might become cumbersome if there are multiple packages affecting the same file.
We had a similar situation for one of our clients, and we moved to Pull Requests - and that worked like a charm. The developer creates a new feature branch, commits their code there, and creates pull requests. For vendors, we can ask them to fork the repository and create pull requests out of it.
Since 10.x sugar has an api to install packages. Maybe it is possible with a githook to create a package and install it on the desired instance?
If you do not want to uninstall/reinstall, the version number change is the best option whether you do it manually or use the API. I prefer to uninstall/reinstall to make sure any files that might have been removed from later versions are removed.
Amy,
I am going to give you some additional food for thought.
The reason why it would be normally better (with some caveats) to uninstall the original module first, and then install the new version, is so that if the old version contained a file which is no longer there on the new package, the actual no longer needed file is removed. Otherwise it will stay there forever as other "Sugar Clubbers" correctly mentioned.
The caveats on why you would not uninstall a module at times are:
Hope it helps thinking the overall deployment process through
--
Enrico Simonetti
Sugar veteran (from 2007)
Feel free to reach out for consulting regarding:
All active SugarCRM certifications
Actively working remotely with customers based in APAC and in the United States
The module loader shows only the latest version in its list when you keep name and id unchanged.
Harald Kuske
Principal Solution Architect – Professional Services, EMEA
hkuske@sugarcrm.com
SugarCRM Deutschland GmbH