forked from OurHike/OurHike
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
44 lines (42 loc) · 1.36 KB
/
Copy path__init__.py
File metadata and controls
44 lines (42 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""Import every ORM model here so app.db.base's Base.metadata is fully
populated - SQLAlchemy only registers a model's table as a side effect of
its module actually being imported somewhere. Without this, alembic/env.py's
`target_metadata = Base.metadata` sees an empty schema regardless of how
many real models exist in the codebase, and `alembic revision --autogenerate`
silently produces an empty migration instead of one creating any tables -
confirmed: this was the actual state before this file existed, per
app/db/base.py's own docstring warning that a model must be "imported
somewhere reachable from here... before autogenerate will see it."
"""
from app.models.closure import Closure, ClosureStatus, ModerationStatus, ReasonType
from app.models.club import Club
from app.models.hike import Hike
from app.models.maintainer_assignment import MaintainerAssignment
from app.models.preferences import UserPreferences
from app.models.profile import Profile, Role
from app.models.report import (
Report,
ReporterType,
ReportStatus,
ReportType,
Severity,
Visibility,
)
__all__ = [
"Closure",
"ClosureStatus",
"ModerationStatus",
"ReasonType",
"Club",
"Hike",
"MaintainerAssignment",
"UserPreferences",
"Profile",
"Role",
"Report",
"ReporterType",
"ReportStatus",
"ReportType",
"Severity",
"Visibility",
]