- Change RawOpdCheckpoint model to RawWaitingTime - Update schema from FeedCheckpointIn to FeedWaitingTimeIn - Switch to rawdata.raw_waiting_time table - Keep existing /feed/checkpoint endpoint - Add new fields: vn, txn, name, doctor_code, doctor_name, location_code, location_name, step_name, time - Update permission to feed.waiting-time:write
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)
|