13 lines
330 B
Python
13 lines
330 B
Python
from sqlalchemy import text
|
|
|
|
from app.db.base import Base
|
|
from app.db.engine import engine
|
|
|
|
|
|
def init_db() -> None:
|
|
with engine.begin() as conn:
|
|
conn.execute(text("CREATE SCHEMA IF NOT EXISTS fastapi"))
|
|
conn.execute(text("CREATE SCHEMA IF NOT EXISTS operationbi"))
|
|
|
|
Base.metadata.create_all(bind=conn)
|