goon/alembic/versions
jtrzupek c8baa11604 feat(api): device-scope user state (favorites/progress/blacklists)
Public instance has no accounts, so all user state was GLOBAL in DB — new users
saw/overwrote each other's (and Jan's) favorites, watched badges and blacklists
(bug 2026-06-10). Add device_id (VARCHAR 64) to 9 state tables with composite PK
(device_id, entity_id); app sends X-Device-Id header (get_device_id dep). All
favorites/scene-favorites/blacklist/watch + scene&movie list/detail (is_favorite,
watched, blacklist-hide) now filter by device. Existing rows backfilled to
'legacy-shared'; POST /me/adopt-legacy reassigns them to the caller once. Old
clients (no header) map to legacy-shared so they keep working until OTA updates.

Migration 0022: add col, backfill, composite PK. Verified on prod: 967 progress
rows preserved, device isolation holds (new device sees none of legacy state).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 08:58:01 +02:00
..
20260502_0001_initial.py Initial commit 2026-05-20 10:10:22 +02:00
20260502_0002_playback_sources.py Initial commit 2026-05-20 10:10:22 +02:00
20260503_0003_playback_dead.py Initial commit 2026-05-20 10:10:22 +02:00
20260504_0004_animated_thumbnail.py Initial commit 2026-05-20 10:10:22 +02:00
20260504_0005_favorite_performers.py Initial commit 2026-05-20 10:10:22 +02:00
20260504_0006_blacklists.py Initial commit 2026-05-20 10:10:22 +02:00
20260504_0007_play_progress.py Initial commit 2026-05-20 10:10:22 +02:00
20260506_0008_performer_search_meta.py Initial commit 2026-05-20 10:10:22 +02:00
20260506_0009_movies.py Initial commit 2026-05-20 10:10:22 +02:00
20260506_0010_favorite_scenes.py Initial commit 2026-05-20 10:10:22 +02:00
20260507_0011_origin_pornapp_to_tube.py Initial commit 2026-05-20 10:10:22 +02:00
20260508_0012_favorite_studios.py Initial commit 2026-05-20 10:10:22 +02:00
20260509_0013_bug_reports.py Initial commit 2026-05-20 10:10:22 +02:00
20260509_0014_favorite_movies.py Initial commit 2026-05-20 10:10:22 +02:00
20260510_0015_bug_reports_movie_id.py Initial commit 2026-05-20 10:10:22 +02:00
20260512_0016_realdebrid_cache.py Initial commit 2026-05-20 10:10:22 +02:00
20260512_0017_drop_realdebrid_cache.py Initial commit 2026-05-20 10:10:22 +02:00
20260528_0018_movie_play_progress.py feat(movies): watched/continue-watching tracking end-to-end 2026-05-28 23:24:06 +02:00
20260531_0019_taxonomy_scene_counts.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00
20260602_0020_scene_tags_tag_id_index.py perf(scenes): drop exact count on filtered lists; index scene_tags(tag_id) 2026-06-02 12:00:36 +02:00
20260607_0021_scene_tags_tag_id_stats.py migration(0021): raise scene_tags.tag_id statistics target to 1000 2026-06-07 21:12:22 +02:00
20260608_0022_device_scoped_user_state.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00