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.
12 lines
482 B
Python
12 lines
482 B
Python
"""Every table, registered on `Base.metadata`.
|
|
|
|
Each unit declares its tables in its own `models` module, so importing `app.models` alone no longer
|
|
names the whole schema. Whatever needs all of it — the migrations, the test database, a check over
|
|
every mapper — imports this module.
|
|
"""
|
|
|
|
import app.catalog.models # Catalog's tables
|
|
import app.downloads.models # Capture's tables
|
|
import app.models # the core tables
|
|
import app.reader.models # noqa: F401 — Reader's tables
|