Damast instances that use the report eviction feature assume that the underlying database contents never change. Otherwise, the content of the report might differ after re-creation out of the evicted state. For link-able, reference-able reports, that could be bad (depending on the extent of those changes). The eviction feature was not meant to be used on systems with a changing database, but smaller additions such as discussed in #91 could still happen, and would affect the report contents.
The changes should not be large in such situations, but it is still necessary to communicate in re-created reports that the data has changed. The idea would be to
Add a database_version table to the reports.db database which contains some metadata about the incrementally-numbered versions of the PostgreSQL database. One structure proposal would be:
CREATE TABLE database_version (
version INTEGER NOT NULL PRIMARY KEY,
date DATE NOT NULL,
description TEXT NOT NULL
);
On each data update to the instance, add a respective entry to the database_version table.
Store the version a report was generated with in the reports table.
On re-generation, if the last version in the table is not the same as the one the report was generated with, add a disclaimer section to the report content detailing the version history as extracted from that table, and marking clearly the original and current version.
Damast instances that use the report eviction feature assume that the underlying database contents never change. Otherwise, the content of the report might differ after re-creation out of the
evicted
state. For link-able, reference-able reports, that could be bad (depending on the extent of those changes). The eviction feature was not meant to be used on systems with a changing database, but smaller additions such as discussed in #91 could still happen, and would affect the report contents.The changes should not be large in such situations, but it is still necessary to communicate in re-created reports that the data has changed. The idea would be to
Add a
database_version
table to thereports.db
database which contains some metadata about the incrementally-numbered versions of the PostgreSQL database. One structure proposal would be:On each data update to the instance, add a respective entry to the
database_version
table.Store the version a report was generated with in the
reports
table.On re-generation, if the last version in the table is not the same as the one the report was generated with, add a disclaimer section to the report content detailing the version history as extracted from that table, and marking clearly the original and current version.
@rpbarczok @tutebatti : Thoughts?