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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAlter database during module installationAlter database during module installation
Previous
 
Next
New Post
3/24/2011 7:02 PM
 
After some days of trying, I finally succeeded in seting up a module development project. The problem I have is creation of tables in the database during module installation. From what I see, some modules are using 1.0.0.SqlDataProvider file with TSQL inside. Are there any guidelines for explaining best practice for making tables during installation and interaction with the database later?
 
New Post
3/25/2011 9:51 AM
 
I haven't seen any "Best Practices" documentation, although you might get some hints by watching the Module Development videos.

The installation framework runs every 1.x.x.SqlDataProvider file, starting with the version you are currently on(1.0.0 if new install), all the way to the most recent version. You should design the TSQL in there so it will run that way.

ex.
1.0.0 Creates tables
1.0.1 Alters tables created in 1.0.0
1.1.0 Alters tables assuming the 1.0.1 schema, etc

Always check to make sure tables exist and remember to take prefixes into consideration, etc.

All this is covered(briefly) in the Module Development videos.
 
New Post
3/27/2011 8:50 AM
 
check out install code from other modules bundled with DotNetNuke. In addition to incemental structure of sql files, it is best practice to make scripts rerunnable, i.e. checking for ccolumns before adding it or dropping stored procedures (if exist) an recreate it.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/29/2011 2:57 AM
 
Thanks for your answers. This sounds like a big job when it commes to upgrades. It would be great if someone could list steps to be followed in upgrade SQL. I presume:
-Delete relationships,
-Add fields (columns),
-Add tables (if any),
-Drop tables (if any),
-Reconstruct relationships and add new relationships.

Could someone confirm above?

Regards,
Alex
 
New Post
3/30/2011 4:17 AM
 
Alex,
you are correct, the easiest option is applying changes using SQL Server Management UI, which generates scripts, you may easily adjust (replace alter procedure by drop and create as well as adding checks for existence and inserting databaseOwner and objectQualifier placeholders.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAlter database during module installationAlter database during module installation


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