[loop-generated] [refactor] Break up _migrate_schema() — 86 lines in unified.py #591

Closed
opened 2026-03-20 16:05:00 +00:00 by Timmy · 0 comments
Owner

Problem

_migrate_schema() in src/timmy/memory/unified.py is 86 lines with three distinct migration blocks.

Proposed Fix

Extract into helpers:

  • _migrate_episodes(conn, tables) — episodes → memories migration
  • _migrate_chunks(conn, tables) — chunks → memories migration
  • _drop_legacy_tables(conn, tables) — drop old facts table

Files

  • src/timmy/memory/unified.py

Acceptance

  • Each helper < 30 lines
  • tox -e unit passes
  • No net increase in LOC
## Problem `_migrate_schema()` in `src/timmy/memory/unified.py` is 86 lines with three distinct migration blocks. ## Proposed Fix Extract into helpers: - `_migrate_episodes(conn, tables)` — episodes → memories migration - `_migrate_chunks(conn, tables)` — chunks → memories migration - `_drop_legacy_tables(conn, tables)` — drop old facts table ## Files - `src/timmy/memory/unified.py` ## Acceptance - Each helper < 30 lines - `tox -e unit` passes - No net increase in LOC
Timmy closed this issue 2026-03-20 16:07:16 +00:00
Timmy self-assigned this 2026-03-20 16:07:17 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#591