Moving Modules via SQL Console

Overview

Environment: DNN version 9 and above.

Administrators may want to implement a new skin on their site, when they will probably need to move certain modules under newly created panes. Depending on the complexity of the site, the effort to make such move can be huge if manually done, hence they might need an automation script to be run in the SQL Console.

Requirements:

  • Module ID that requires the update.
  • The new Pane Name to become effective.

Step by Step

Follow these steps to have the module moved to a new pane:

  1. IMPORTANT: Ensure to back up the site and the database before proceeding with the next steps below.
  2. Log in to the site as a host/superuser.
  3. Go to Persona Bar > Settings > SQL Console.

  4. Run the following SQL script, replacing @ModuleID and @PaneName in the code to match with the site details:
    UPDATE TabModules
    SET PaneName = '@PaneName', moduleorder = 9 
    WHERE moduleid = @ModuleID

    UPDATE TabVersionDetails 
    SET panename = '@PaneName', moduleorder = 9 
    WHERE moduleid = @ModuleID
    Note: In case you want to update multiple modules in a single command, change the WHERE clause to include additional Module IDs delimited by commas, like: WHERE moduleid in (ModuleID1, ModuleID2, ModuleID3).

  5. Clear the server cache.
  6. Test the modules in the browser to ensure they are correctly set to the new panes.

Comments

0 comments

Please sign in to leave a comment.