{{ message }}
fix(import): preserve file and journal mention timestamps - #13148
Open
tiensonqin wants to merge 14 commits into
Open
fix(import): preserve file and journal mention timestamps#13148tiensonqin wants to merge 14 commits into
tiensonqin wants to merge 14 commits into
Conversation
… logseq/fix-import-timestamps-a745 Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Preserve source timestamps through UI import, overwrite file-backed pages after first mention, and use the first journal date for pages that only exist as references. Coerce Date and epoch-ms values without crashing on numbers or Linux epoch-0 birthtime. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Extract stamps reference pages with import time, so missing-timestamp fill never saw a blank created-at. Overwrite those stamps for non-journal named pages created from a journal, and use mtime when birthtime is missing or epoch 0. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
tiensonqin
marked this pull request as ready for review
August 31, 2026 17:20
Use the current journal filename for first-mention timestamps instead of counting extracted journal-day pages. Keep filesystem times on file-backed pages, and do not overwrite an earlier journal mention when the later page file has no stats. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Use a real birthtime for created-at when present. Fall back to mtime when birthtime is missing or invalid. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Prefer a file page's birthtime, or mtime when birthtime is missing, over the journal mention date. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Look up pages already in the db so a later journal mention does not recreate them or replace file timestamps. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
User pages like alias must not collide with built-in schema pages during import. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Rename the existing-page lookup so it does not shadow a local, and drop the German heading that typos flagged. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
File birthtime/mtime must not replace a journal page's created-at. Journal files stay on their journal day. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes logseq/db-test#1047
Builds on #13032 so file-to-DB import keeps source timestamps instead of the import time.
Behavior change
File.lastModified.<get-file-statis nil in the worker).Tests
Reproduced the db-test#1047 conversation cases plus review regressions in
deps/graph-parsernbb tests.OG IndexedDB created/updated columns (discussed on the issue) are not imported. Those values are not stored in the file graph.