MySource Matrix Developer

Main Content

Improved Rollback Management Script

Summary

This document proposes steps that rollback management script will perform on behalf of the user.

Status: Draft
Key: draft -> approved proposal -> scheduled -> in development -> in testing -> complete -> released

Estimated Start Date: Wed, 21 Jun 2006
Estimated End Date: Wed, 21 Jun 2006

This feature is not scheduled for release

Problem Definition

The rollback management script currently performs the function of closing or re-opening rollback entries in preparation for turning rollback on or off.

However, further steps are required to properly enable or disable rollback - turning rollback on or off in the main.inc configuration file, then running the step_02.php installation script to enable or disable the triggers used to generate rollback data.

If these additional steps are not followed, rollback is not correctly enabled or disabled, and this causes problems further down the track.

Technical Specification

Disabling Rollback Support

When disabling rollback support, rollback management script will need to change the SQ_CONF_ROLLBACK_ENABLED setting in MATRIX_ROOT/data/private/conf/main.inc and disable triggers by running installation step 2.

To edit the SQ_CONF_ROLLBACK_ENABLED setting, rollback management script will need to read the main.inc file and find the line where SQ_CONF_ROLLBACK_ENABLED is defined. It will then needs to override the line with the following:

define('SQ_CONF_ROLLBACK_ENABLED', '0');
 or
define('SQ_CONF_ROLLBACK_ENABLED', false);
Once the setting is changed it will save the file and close it. Then it will execute command line argument for installation step2 to disable the database rollback triggers. This can be done using the PHP exec command.
Enabling Rollback Support

Rollback management script will need to read the contents of MATRIX_ROOT/data/private/conf/main.inc and override the line that contains the SQ_CONF_ROLLBACK_ENABLED setting with the following line:

define('SQ_CONF_ROLLBACK_ENABLED', '1');
 or
define('SQ_CONF_ROLLBACK_ENABLED', true);
After saving the changes it will execute the installation step 2 to enable the rollback triggers.