Changelog

Overview

The Changelog functionality is used to track CRUD changes made to selected tables and fields in the database. 

If a change is made by the same user within 60 seconds of the previous change, the existing Changelog record is updated.

The fields that are audited are documented in each module.

How it works

Every table requires a USERUPDATED field which is populated from the front end on every Insert, Update or Delete.

The changes are recorded in the table CHANGELOG - Fields include:

A Trigger is created for every table that is monitored and is named: TR_TABLENAME_CHANGELOG

The trigger updates the CHANGELOG table using the stored procedure TR_TABLENAME_CHANGELOG

The procedure CHANGELOG_SELECT is used to provide a user-friendly log of changes.

Keys

CRUDID

Steps to implement

Document the fields that will be checked - in the module documentation under a heading Changelog

Create a trigger that updates Changelog after insert, update and delete - naming: TR_TABLENAME_CHANGELOG

Update procedure CHANGELOG_SELECT_CAPTION - converts NAMES to CAPTIONS

Create procedure to select the Changelog  - naming: TABLENAME_CHANGELOG

Add a menu item to View Changelog