📝 Update internal README and referred files (#613)
This commit is contained in:

committed by
GitHub

parent
42726193d0
commit
544f89f253
@@ -12,8 +12,13 @@ from app.models import User, UserCreate # noqa: F401
|
||||
def init_db(session: Session) -> None:
|
||||
# Tables should be created with Alembic migrations
|
||||
# But if you don't want to use migrations, create
|
||||
# the tables un-commenting the next line
|
||||
# Base.metadata.create_all(bind=engine)
|
||||
# the tables un-commenting the next lines
|
||||
# from sqlmodel import SQLModel
|
||||
|
||||
# from app.db.engine import engine
|
||||
# This works because the models are already imported and registered from app.models
|
||||
# SQLModel.metadata.create_all(engine)
|
||||
|
||||
user = session.exec(
|
||||
select(User).where(User.email == settings.FIRST_SUPERUSER)
|
||||
).first()
|
||||
|
Reference in New Issue
Block a user