We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dfac18 commit d94fdb8Copy full SHA for d94fdb8
backend/app/app/db/init_db.py
@@ -2,6 +2,10 @@
2
from app.core import config
3
from app.models.user import UserCreate
4
5
+# make sure all SQL Alchemy models are imported before initializing DB
6
+# otherwise, SQL Alchemy might fail to initialize properly relationships
7
+# for more details: https://github.com/tiangolo/full-stack-fastapi-postgresql/issues/28
8
+from app.db import base
9
10
def init_db(db_session):
11
# Tables should be created with Alembic migrations
0 commit comments