DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Installer - order of operations

 1 Replies
 1 Subscribed to this topic
 21 Subscribed to this forum
Sort:
Author
Messages
Growing Member Send Private Message
Posts: 101
Growing Member

When you install a new version of DNN or a module, the installer performs a number of operations, including SQL updates, upgrade code, file cleanup, etc. When you are performing a "skip upgrade", these operations are performed sequentially by type of operation rather than performing each type within each version being upgraded. Here's an example:

I assume this order of operations is used to minimize the application restarts, but it can be problematic.

As an example, suppose I have version 1 installed, and want to install version 3, but version 3 removes a table used by version 2.

When the installer runs, these operations would occur:

  • SQL updates - version 2
  • SQL updates - version 3
  • upgrade code - version 2
  • upgrade code - version 3

Now, assume there is upgrade code in version 2 that uses the table to do something. But version 3 removes the table. In that case, the upgrade code for version 2 will fail, because the SQL update for version 3 has already run, and removed the table.

In the Forums module, we've made a lot of structural updates, and so far we've been able to work around this behavior, but I envision a time where we might break an upgrade, say someone upgrading from version 6 to version 9. We really don't want to create a multi-version upgrade path requirement. We also don't want to recreate the entire SQL landscape with every version, but rather, leverage the current SQL installer to bump from version to version.

Is there any interest in the community for changing the installer behavior, perhaps as an option in the manifest to order the operations by version?

Senior Member Send Private Message
Posts: 1513
Senior Member
I think the only way to get around this without significantly changing the installation engine is to ensure that all upgrade operations are able to run more than once without throwing an error. In the database example, this is why this specifically usually has IF statements before an execution. If it's already happened, then don't run the operation. When it comes to the upgrade code (e.g., IUpgradeable), we simply have to work around that with our knowledge. It would be up to us to ensure that the upgrade path is smoother, for the given platform.

These Forums are dedicated to the discussion of DNN Platform.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved