frigate/migrations
Claude 89adfe19e0
VOD overlap query optimization, caching, and refactor
- A1: Rewrite overlap query from OR-based predicate to canonical form
  (end_time > start AND start_time < end) which is index-friendly
- A2: Add composite (camera, start_time, end_time) and (camera, end_time)
  indexes via migration to support the new overlap predicate
- A3: Add bounded LRU in-process cache for historical VOD mapping
  payloads to avoid repeated DB + assembly work on re-opens
- A4: Extract vod_ts internals into query/normalize/payload helpers
  in frigate/api/vod.py for benchmarking and future swapability
- Also update the recording_clip download path to use the same
  canonical overlap predicate

https://claude.ai/code/session_01XeVxvSk9ywyPBR288ZZXWE
2026-03-07 01:26:20 +00:00
..
001_create_events_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
002_add_clip_snapshot.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
003_create_recordings_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
004_add_bbox_region_area.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
005_make_end_time_nullable.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
006_add_motion_active_objects.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
007_add_retain_indefinitely.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
008_add_sub_label.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
009_add_object_filter_ratio.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
010_add_plus_image_id.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
011_update_indexes.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
012_add_segment_size.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
013_create_timeline_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
014_event_updates_for_fp.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
015_event_refactor.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
016_sublabel_increase.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
017_update_indexes.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
018_add_dbfs.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
019_create_regions_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
020_update_index_recordings.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
021_create_previews_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
022_create_review_segment_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
023_add_regions.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
024_create_export_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
025_create_user_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
026_add_notification_tokens.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
027_create_explore_index.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
028_optional_event_thumbnail.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
029_add_user_role.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
030_create_user_review_status.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
031_create_trigger_table.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
032_add_password_changed_at.py Update peewee-migrate to 0.14.x (#21243) 2025-12-13 07:13:04 -07:00
033_create_export_case_table.py Create scaffolding for case management (#21293) 2026-02-26 21:27:56 -07:00
034_add_export_case_to_exports.py Create scaffolding for case management (#21293) 2026-02-26 21:27:56 -07:00
035_add_motion_heatmap.py Improve motion review and add motion search (#22253) 2026-03-05 17:53:48 -06:00
036_add_recordings_vod_indexes.py VOD overlap query optimization, caching, and refactor 2026-03-07 01:26:20 +00:00