3.7.1. History viewer
PostgresSQL history viewer plugin allows you to retrieve modification on the TWW database.
Install the plugin from the QGIS Plugin repository.
3.7.1.1. Plugin configuration
First, you have to configure the plugin for the session like this:
3.7.1.2. Database configuration
Then you need to enable logging on desired tables or views.
For views:
SELECT tww_sys.audit_view('tww_od.vw_tww_wastewater_structure', 'true'::boolean, '{}'::text[], '{obj_id}'::text[]);
For tables:
SELECT tww_sys.audit_table('tww_od.reach_point');
Note
You can disable logging with:
SELECT tww_sys.unaudit_view('tww_od.vw_tww_wastewater_structure');
SELECT tww_sys.unaudit_table('tww_od.reach_point');
3.7.1.3. Usage
The “logged events” window is composed of 4 parts.
Part identifying the tools used to filter modifications in the database.
Logged events with the modification date, the table, the action type “Update/Delete/Insert”, the application and the user who made the modification.
The view comparing the data before and after the change. The red lines are the ones modified.
If the geometry has been modified, a canvas will show the difference.
3.7.1.4. Replay function
If you have configured the replay option, you can replay actions. Example below:
Actual value:
Select the event you want to replay and its values will become the current ones. Example for the year that becomes 2004 again: