init
This commit is contained in:
0
app/db/__init__.py
Normal file
0
app/db/__init__.py
Normal file
5
app/db/base.py
Normal file
5
app/db/base.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
|
||||
class Base(DeclarativeBase):
|
||||
pass
|
||||
7
app/db/init_db.py
Normal file
7
app/db/init_db.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from app.core.database import engine
|
||||
from app.db.base import Base
|
||||
from app.models import user # noqa: F401
|
||||
|
||||
|
||||
def init_db() -> None:
|
||||
Base.metadata.create_all(bind=engine)
|
||||
Reference in New Issue
Block a user