Skip to content

fix: use date columns for Evernote timestamps in DB mode#135

Open
yaniv-golan wants to merge 1 commit intovzhd1701:masterfrom
yaniv-golan:fix/db-schema-dates
Open

fix: use date columns for Evernote timestamps in DB mode#135
yaniv-golan wants to merge 1 commit intovzhd1701:masterfrom
yaniv-golan:fix/db-schema-dates

Conversation

@yaniv-golan
Copy link
Copy Markdown

Summary

  • DB mode previously used created_time and last_edited_time column types, which are auto-managed by Notion and get overwritten on any page edit
  • New schema uses explicit date columns prefixed with "Evernote" for all imported metadata, preserving original timestamps reliably
  • Adds Evernote Author field (previously only available via --add-meta callout)
  • Keeps Last Modified as Notion-native for tracking actual edits in Notion

New DB schema

Column Type Description
Title Title Note title
Evernote Tags Multi-select Tags from Evernote
Evernote URL URL Source URL
Evernote Created Date Original Evernote creation date
Evernote Updated Date Original Evernote last edit date
Evernote Author Text Note author
Evernote Imported Created time Import timestamp (auto)
Last Modified Last edited time Last Notion edit (auto)

Setup script

Includes scripts/create_notion_db.py using the official Notion API to create the database with correct schema + optional formula columns (Real Created, Real Updated) that bridge imported and native Notion notes.

Note on DB creation

Due to Notion internal API changes, programmatic database creation via submitTransaction no longer works. Users must pre-create the database either manually or using the provided script before running enex2notion --mode DB.

Test plan

  • Manually verified with real ENEX import — Evernote Created/Updated preserved correctly across page edits
  • Existing databases with old column names ("Tags") still detected via backwards-compatible lookup
  • Setup script tested against Notion API

The previous schema used created_time and last_edited_time column types
which are auto-managed by Notion and get overwritten on any edit.

New schema uses explicit date columns prefixed with "Evernote" for all
imported metadata (Tags, URL, Created, Updated, Author, Imported),
keeping Last Modified as Notion-native for tracking edits.

Includes setup script (scripts/create_notion_db.py) using the official
Notion API to create the database with correct schema and formula
columns (Real Created, Real Updated). Also documents the full DB setup
in the README.
@yaniv-golan yaniv-golan force-pushed the fix/db-schema-dates branch from 546f7d2 to 9a54758 Compare March 30, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant