Uninstalling a Patch, in a specific circumstance, will not restore the data in the table to the expected contents
|Date:||12 June 2014|
|Product/Release:||Visual LANSA - V13 SP2|
|Abstract:||Depending on options selected when deploying file changes via patch, the data may not be restored after uninstalling the patch.|
|Submitted By:||LANSA Technical Support|
Uninstalling a Patch, in a specific circumstance, will not restore the data in the table to the expected contents.
The circumstance is:
- The patch has a file with the File Data option set to Include Data
- There is no change to the data, so as the DAT file has not changed, it is not shipped in the patch
- The version or patch that was installed prior to this patch had a file with the File Data option set to Include Data\Drop Existing, AND there was data actually exported – the table had data in it when building the Package.
Then and only then, the original data is not reloaded. This is due to the deletion of the original DAT file after installing. So it is not there to be used by the uninstall – unless the Patch being uninstalled actually installed a DAT file. In that case, the uninstall restores the original DAT file and so the data will be reloaded.
To avoid this situation:
- When there is no data to ship, always set the File Data option to Exclude Data, Reload Existing. Even for empty files.
- In a Version, when including data, use one of the Include Data options - Replace Duplicates or Ignore Duplicates
- In a Patch always set all Files to Exclude Data, Reload Existing, unless there is actually changed data to ship. Then use one of the Include Data options - Replace Duplicates or Ignore Duplicates.
- If you chose to use any other combination of File data options, thoroughly test installing and uninstalling a number of Versions and Patches to ensure it meets your requirements.
Important Note: Use of the Include Data ‘existing files only’ options is deprecated. They will be removed in the next release of Visual LANSA. By following the recommendations above, they are no longer required.
The workaround (to restore the data) is to run the original install.
- For an MSI, run it again and you will be prompted to Repair or Remove. Click Repair.
- For a Patch, re-install the patch.
Remember that patches which include file changes must be installed in Patch number numerical order and uninstalled in reverse order. Any other order and the database may not be in the correct state.
Also note that a file with Exclude Data set will only be unloaded and reloaded if the table layout (CTD file) has changed. So it should be unnecessary to use the Include Data (new files only) and Include Data (existing files only) options, which may create unwanted scenarios when uninstalling.