Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DataProvider file reorganizationDataProvider file reorganization
Previous
 
Next
New Post
1/17/2009 9:14 AM
 

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?

 
New Post
1/19/2009 12:08 AM
 

Hey r_honey,

I'm not completely sure I follow the problem you're having, but it seems as though we just need to clear up how the sql script execution works.

SqlDataProvider scripts are simply executed based on version. For instance, if you've installed a 01.00.00 version of the module on the site (specified in the manifest file), and you upgrade to 02.00.00 (and include an accompanying 02.00.00.SqlDataProvider), only the 02 version will be run. However, upon a clean installation of the 02.00.00 module, both 01.00.00 and 02.00.00 would be installed.

Hope that helps,

Ian


Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
New Post
1/23/2009 12:14 AM
 

Hi Ian, you did not understand my problem properly. Let me take an example.

A User installs DNN 4.5.0. Now, if he upgrdaes to DNN 5.0.0, all DataProviders > 4.5.0 & <= 5.0.0 executes. But for a new user installing DNN 5.0.0, only a single DataProvider 5.0.0 executes. However, a User installing a clean DNN 4.9.0 also has DataProviders from (probably) 4.6.0 to 4.9.0 executing.

If you monitor carefully, DNN core seems like having a setting, where a a core version is specified as a major one. Users upgrading from previous versions have their DBs upgraded appropriately. However, for the major version, the core team provides a separate DataProvider which sets up the DB from scratch for that version. This helps clean-up DataProviders after a series of upgrades.

My question is can I do this with module DataProviders also?? I hope a core team member understands what I mean!!

 
New Post
1/23/2009 12:33 AM
 

There is a setting in dotnetnuke.config (under the install folder) which tells the installer which is the base version of DNN to use. In the past this has been 4.4.0 and now 5.0.0). This is the setting that basically tells the installer to run the scripts in the manner which you're saying. In the case of 5.0.0, the 05.00.00.sqldataprovider script is NOT run for clean (new) installs whereas it is run for installs which are upgrading from older versions.
With your module dataproviders, there isn't a way of doing this (AFAIK) since the installer for DNN looks for script files and runs them based on the version it finds in the database for a particular module.
The best practice (and Sebastian can correct me on this) would be to wrap your scripts with clauses which check whether something already exists prior to executing the script.  You can also include statements in your script that check what version of a particular module (in your case Module 1) is installed, which then alters the way the script is executed.

The other option that I thought of - which is more painful, would be to rename your module as a new module and create one master script for it. If your users have an existing version of the module, your new module checks this (during installation) and acts appropriately. For your new users, the new script runs in its entirety.

Hope this helps.

Sanjay


AcuitiDP - Oracle Data Provider for DotNetNuke
 
New Post
1/30/2009 2:06 AM
 

Looks like I need to go for a custom solution.

Anyways, someone was able to understand what I meant. If DNN team thinks (and it should think so), that this could be a common requirement, so can I reuqest this as an enhancement on Gemini??

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DataProvider file reorganizationDataProvider file reorganization


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

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

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. 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.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out