Skip to content

Reset __added_ms on undelete (re-insert after delete)#25

Merged
simonw merged 1 commit intomainfrom
claude/fix-chronicle-undelete-timestamp-5TBuf
Feb 15, 2026
Merged

Reset __added_ms on undelete (re-insert after delete)#25
simonw merged 1 commit intomainfrom
claude/fix-chronicle-undelete-timestamp-5TBuf

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Feb 15, 2026

Currently if you delete a record and then insert a record with the same primary key the chronicle table preserves the original added_ms timestamp. I think undeleting (aka reusing a previously-used primary key) should reset that to the time of the undelete operation.

When a row is deleted and then re-inserted with the same primary key,
the chronicle table now resets __added_ms to the time of re-insertion
instead of preserving the original timestamp. This treats an "undelete"
as a fresh addition rather than a continuation of the original row's
history.

https://claude.ai/code/session_01P4uLezdayhdFddtTWeEkhN

When a row is deleted and then re-inserted with the same primary key,
the chronicle table now resets __added_ms to the time of re-insertion
instead of preserving the original timestamp. This treats an "undelete"
as a fresh addition rather than a continuation of the original row's
history.

https://claude.ai/code/session_01P4uLezdayhdFddtTWeEkhN
@simonw simonw added the bug Something isn't working label Feb 15, 2026
@simonw simonw linked an issue Feb 15, 2026 that may be closed by this pull request
@simonw simonw merged commit 074d8e4 into main Feb 15, 2026
10 checks passed
simonw added a commit that referenced this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I deleted records should get a new added_ms

2 participants