Skip to content

Add last changed timestamp to metadata - #2482

Open
DavidMStraub wants to merge 1 commit into
gramps-project:masterfrom
DavidMStraub:last_changed_timestamp_metadata
Open

Add last changed timestamp to metadata#2482
DavidMStraub wants to merge 1 commit into
gramps-project:masterfrom
DavidMStraub:last_changed_timestamp_metadata

Conversation

@DavidMStraub

@DavidMStraub DavidMStraub commented Jul 27, 2026

Copy link
Copy Markdown
Member

(Feature PR against 6.2 branch.)

This PR adds a single new metadata entry, namely a last change timestamp.

Currently, the file modification date of the empty file meta_data.db in the database directory is used for this purpose. Gramps Web API's undo transaction log relies heavily on this timestamp.

Storing the timestamp in the database instead is much more robust.

This would allow the Gramps Web Sync addon to rely on it, too, making time-based sync more reliable.

A database migration is not needed as this change is backward compatible.

Note that the timestamp is stored as float for higher accuracy, not as int as the object change column. Consequently, it is guaranteed to always be larger than the largest change timestamp in the database.

@DavidMStraub

Copy link
Copy Markdown
Member Author

To clarify: the timestamp is set exactly in the same instances as the meta_data.db one, plus at database creation. The meta_data.db timestamp is not removed, so we stay backward compatible.

@hgohel hgohel added Type: Enhancement Status: New A new pull request that is awaiting developer comments before review. labels Jul 27, 2026
@dsblank

dsblank commented Jul 27, 2026

Copy link
Copy Markdown
Member

@DavidMStraub master will become Gramps 6.2; Gramps 6.1 is maintenance/gramps61 and is only excepting bug fixes.

@DavidMStraub

Copy link
Copy Markdown
Member Author

Thanks for the heads up.

It would be great if somebody could bring the 6.1 and 6.2 roadmaps up to date. They are still skeletons.

@DavidMStraub
DavidMStraub force-pushed the last_changed_timestamp_metadata branch from 08067bc to 430c666 Compare July 27, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: New A new pull request that is awaiting developer comments before review. Type: Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants