This is the documentation for an older version of Scroll Versions. Here you can view the most up-to-date version of Scroll Versions.

Delete all Scroll Versions-Related Data

When Scroll Versions is disabled or uninstalled it leaves some data behind that will be used, if the Scroll Versions is enabled again. If you want to completely remove all data, this article will guide you through the necessary steps.

Workaround

If you are unfamiliar with DB queries, or do not have access to the server, follow this workaround to delete all traces of Scroll Versions from a space.

(warning) IMPORTANT: The space key will change after completing these steps.

  1. Publish the desired version to a new space.
  2. Delete the space where Scroll Versions is activated.
  3. Uninstall Scroll Versions.

There is a way to change the space key, but it involves using a plugin not supported by Atlassian. Please back up your Confluence instance before following the steps below.

You can use the Copy Space Plugin to revert the space key to the original value. The Plugin is not supported by Atlassian, and is only compatible with up to Confluence 5.5.7. However, it works on Confluence 5.7. The process is to copy the space to a new one with original space key.

Before you begin: To copy the space, you must log in with Space Admin permissions and the Copy Space Plugin must be instaleld.

  1. Open the space and click Browse > Space Admin.
  2. In the General tab click Copy Space and enter the Name and the space Key you want to use.
  3. Activate the needed check boxes and click Save.
  4. Delete the space that was using non-original space key.

The space is copied and is available under the defined space key.

Overview

A Scroll Versions enabled space makes three main changes to an ordinary confluence space:

  1. Space-wide configuration data (such as space roles, enabled modules, etc.) is stored in the Bandana persistence (table name: BANDANA).
  2. Page-level meta data, such as target, page key, or page title are stored as so-called content properties (table name: OS_PROPERTYENTRY).
  3. Versioned Pages are normal Confluence pages, that represent a version of a page. Therefore, they have special page-level meta data (see #2) and have a special page title that follows the pattern ".<page-title> v<target-version>", for example '.mytitle+v1.0'.

In order to remove all Scroll Versions related data the above data needs to be removed.

Detect which spaces contain Scroll Versions-related data

To detect, which spaces contain Scroll Versions-related data, execute the following statement:

View VSN Configuration data for a space
SELECT bandanacontext FROM bandana WHERE bandanakey LIKE '%com.k15t.scroll.versions%';

(info) Please note, that "_GLOBAL" is not a space but the global context. See "Delete Scroll Versions-related data from the _GLOBAL context" (below).

Delete Scroll Versions-related data from a space

Step 1: Display Scroll Versions-related data

First we display all Scroll Versions-related data, to check what needs to be deleted.

Space-wide configuration data

To output space-wide configuration, data execute the following SQL statements. Replace <spacekey> with the appropriate space key.

View VSN Configuration data for a space
SELECT * FROM bandana WHERE bandanakey LIKE '%com.k15t.scroll.versions%' and bandanacontext = '<spacekey>';

Page-level meta data

To output page-level meta data, execute the following SQL statements. Replace <spacekey> with the appropriate space key.

View VSN content properties for a space
SELECT entity_id,text_val,title FROM os_propertyentry inner join content on entity_id = contentid where entity_key LIKE '%com.k15t.scroll.versions%' and spaceid IN (select spaceid from spaces where spacekey = '<spacekey>');

Versioned Pages

To list all versioned pages in this this space, execute the following SQL statements. Replace <spacekey> with the appropriate space key.

View versioned data for a space
SELECT title,entity_id FROM os_propertyentry inner join content on entity_id = contentid WHERE spaceid IN (select spaceid from spaces where spacekey = '<spacekey>') and text_val = 'change';

(warning) IMPORTANT: Store the output of this command to a text file, it will be needed later.

Step 2: Delete Scroll Versions-related data

Space-wide configuration data

To delete space-wide configuration data, execute the following SQL statement. Replace <spacekey> with the appropriate space key.

delete from bandana where bandanakey like '%com.k15t.scroll.versions%' and bandanacontext = '<spacekey>';

Page-level meta data

To delete page-level meta data, execute the following SQL statement. Replace <spacekey> with the appropriate space key.

(warning) Please make sure you have saved the list of Versioned Pages generated in Step 1. Once the page-level meta data is deleted there will be no easy way to detect which pages are Versioned Pages.

delete FROM os_propertyentry where entity_key like '%com.k15t.scroll.versions%' and entity_id IN (select contentid from content where spaceid IN (select spaceid from spaces where spacekey = '<spacekey>'));

Versioned Pages

Because the Versioned Pages are simple Confluence pages, we suggest to use the Confluence UI.

To delete a single page:

  1. Copy the following command in the browser line, customize the commands in "< >" and execute it:

    http://<my.confluence.site>/pages/viewpage.action?pageId=<pageid>

    e.g. http://confluence.k15t.com/pages/viewpage.action?pageId=83329425

  2. Click on Tools > Remove
  3. Click on Confirm.

After you deleted all identified pages you also might want to purge the trash (Space Admin > Trash > Purge All)

If you find need to delete a long list of page IDs, which can be deleted manually we suggest to use the Confluence Command-Line Interface or create a SQL script based on the Confluence Knowledge Base article How to Remove a Page Manually in the Database Using SQL Commands.

Step 3: Verify that Scroll Versions-related data has been deleted

After you have removed all Scroll Versions data, you should verify on the database that all VSN related data has been successfully removed. In order to do that, please just run the select statements from Step 1 once again.

Delete Scroll Versions-related data from the _GLOBAL context

To delete user-specific settings that have been stored in the _GLOBAL context, execute the following statement:

delete from bandana where bandanakey like '%com.k15t.scroll.versions%' and bandanacontext = '_GLOBAL';

Uninstall Scroll Versions

Uninstall the plugin "Scroll Versions", and if your are not using Scroll Translations, uninstall the plugin "Scroll Platform", too.

Restart Confluence

Confluence needs to be restarted, as Confluence caches data read from the database. After the restart you should see your space as a clean and ordinary confluence space.