Seeing forum messages recently about installer and module install order reminded me that I wanted to post a topic and see if anyone has any insight or suggestions. In packaging for the Forums module, I've become intimately familiar with the DNN installer code since we've had some install challenges to maintain backward compatibilty and upgradeability from older versions. Here goes...
IMO there is a flaw in the installer.
If you are updating from an older version (say 7.0.11 to 8.0.1), you need to go from: 7.0.11 -> 7.0.12 7.0.12 -> 8.0.0 8.0.0 -> 8.0.1
If I change a SQL schema in 8.0.1, it will already have taken effect when the 7.0.12 and 8.0.0 IUpgradeable is invoked.
Unfortunately, the module installer does all of the sql first, then all of the IUpgradeables.
So it does: 07.00.12.SqlDataProvider 08.00.00.SqlDataProvider 08.00.01.SqlDataProvider
THEN it does IUpgradeable 07.00.12 IUpgradeable 08.00.00 IUpgradeable 08.00.01 IUpgradeable
WHAT I think it SHOULD DO: 07.00.12.SqlDataProvider 07.00.12 IUpgradeable 08.00.00.SqlDataProvider 08.00.00 IUpgradeable 08.00.01.SqlDataProvider 08.00.01 IUpgradeable
Posted By Daniel Valadas on 6/28/2024 4:01 PM It would be cool but it would bring another issue. IUpgradeable can only run after a site restart. It is scheduled to run after next start. Aaand it needs to run after DI is initialized. That would mean many restarts for a single module that has many versions. And for DNN itself, it would be a massive number of restarts.
At first, I was thinking, "Dang, that's a great point, John... Nice find!"
But, this makes sense as to why it works the way it does.
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.