include time restriction
All checks were successful
release-tag / release-image (push) Successful in 42s
All checks were successful
release-tag / release-image (push) Successful in 42s
This commit is contained in:
@@ -9,6 +9,7 @@ engine = create_engine(str(settings.SQLALCHEMY_DATABASE_URI))
|
||||
# otherwise, SQLModel might fail to initialize relationships properly
|
||||
# for more details: https://github.com/fastapi/full-stack-fastapi-template/issues/28
|
||||
|
||||
|
||||
def init_db(session: Session) -> None:
|
||||
# Tables should be created with Alembic migrations
|
||||
# But if you don't want to use migrations, create
|
||||
@@ -16,4 +17,4 @@ def init_db(session: Session) -> None:
|
||||
from sqlmodel import SQLModel
|
||||
|
||||
# This works because the models are already imported and registered from app.models
|
||||
SQLModel.metadata.create_all(engine)
|
||||
SQLModel.metadata.create_all(engine)
|
||||
|
||||
Reference in New Issue
Block a user