I have developed a set of related modules. Over time, they have eveloved with many changes & enhancements.
With each module upgrade, a new DataProvider file was added to adapt the database structure appropriately. Now, there have been some breaking changes to module & database structure. I have a situation where Module 2 depends upon Module 1. However, the latest version of Module 1 has dropped a DB column and Module 2 has adapted accordingly.
For a user upgrading to latest versions, there is no problem. But for a user installing these modules from scratch, Module 2 instllation raises SqlExceptions because it is installed after Module 1 whose installation created and dropped that DB column.
Now, earlier DataProvider files in Module 2 still refer that column, and hence raise exceptions.
I have seen for the core DNN installation, all appropriate DataProvider files are executed when upgrading. However, specific DNN versions when installed from scratch execute just one single DataProvider file.
What this means is that there is some setting, through which you can mark a particular version. When upgrading, it is normal. But you can provider a separate DataProvider file which sets up the database cleanly in case a clean install is made.
Is this functionality available for Modules also?? Can I organize DataProvider file into such sets that are exceuted for upgradation or clean installation?