refactor(catalog): the unit's tables move into catalog/models

Channel, Subscription, Video, SearchFind, ExploredChannel and BlockedChannel (and LIVE_OR_UPCOMING)
leave app/models.py for app/catalog/models.py; app.tables registers them. The User↔Subscription
relationship names its other side as a type only. No schema change.
This commit is contained in:
2026-10-19 02:03:14 +02:00
parent a35eece652
commit 238e6f8a61
55 changed files with 353 additions and 308 deletions
+3 -2
View File
@@ -9,7 +9,8 @@ from app.auth import current_user
from app.collation import sorted_words
from app.db import get_db
from app.main import app
from app.models import Channel, PlexCollection, PlexItem, PlexLibrary, Subscription, User, Video
from app.models import PlexCollection, PlexItem, PlexLibrary, User
from app.catalog.models import Channel, Subscription, Video
from app.reader.models import Playlist, PlaylistItem
from datetime import datetime, timezone
@@ -222,7 +223,7 @@ def test_the_share_recipients_are_in_the_readers_alphabet(db, monkeypatch, overr
def test_the_blocked_channels_are_in_the_readers_alphabet(db, monkeypatch, override_dep):
from app.models import BlockedChannel
from app.catalog.models import BlockedChannel
user = _user(db, "hu")
db.add_all(Channel(id=f"UC{i}", title=w) for i, w in enumerate(WORDS))