feat: implement legacy history migration (closes #24)

This commit is contained in:
xavierk
2026-09-01 23:09:05 +05:30
parent 6a1841c447
commit d005412c0d
5 changed files with 861 additions and 0 deletions
+7
View File
@@ -294,6 +294,13 @@ def run_collection(
# Initialize store if needed
store_path = get_store_path(config)
conn = init_store(store_path)
# Run legacy import if needed (idempotent)
from .legacy import import_legacy_history
history_path = Path(config.get("data_dir", ".")) / "history.jsonl"
if history_path.exists():
import_legacy_history(conn, history_path, clock=clock)
try:
# Validate invariants