I've recently added a couple of minor enhancements to better support module development.
1. Delete Settings
Four new methods to delete settings both in ModuleSettings (DeleteModuleSetting, DeleteModuleSettings) and TabModuleSettings (DeleteTabModuleSetting, DeleteTabModuleSettings)
2. Selecting all modules of a given type
There's a new method in ModuleController that will return all module instances of a given type: GetModulesByDefinition.
There was already a similar one (GetModuleByDefinition) but this only returned the first one.
3. New options for database scripting
Similar to how Core is implemented, modules will have a new feature to script a base version for it's database structure.
Including a file "Install.<version>.SqlDataProvider" will be run only on new installs and can be used as a base starting point for your newer versions. So instead of executing all scripts from version 0 up to the most current, you can assemble a base script for a given version so it will leave the module at the same point as if running all the scripts up to this version.
Rules:
- if present it will be executed first
- install script is only executed on first time intalls, not on upgrades
- is optional
- if no : "000000" is assumed
- after install script is executed all upgrade scripts with a version number superior than the one in install script will also be executed
- IUpgrade will only be fired for upgrades, not for install script (initial version)
Example: given a module that includes following files
install.01.00.00.sqldataprovider
00.00.01.sqldataprovider
00.00.02.sqldataprovider
00.00.03.sqldataprovider
00.00.04.sqldataprovider
00.00.05.sqldataprovider
01.00.00.sqldataprovider
01.01.00.sqldataprovider
01.02.00.sqldataprovider
a/ on a new installation it will run
install.01.00.00.sqldataprovider
01.01.00.sqldataprovider
01.02.00.sqldataprovider
b/ if upgrading from any version same behaviour as before, install script is not run
c/ if install script is named "Install.Sqldataprovider" all scripts will run in the same order as listed above
And remember, your feedback on our support web is welcome and monitored on a regular basis (even though I'm sure we can improve this *grin*).