system_assignation/persistence/db_setup.py
2022-12-07 19:06:17 -05:00

11 lines
404 B
Python

from persistence.models import City
from persistence import BaseRepo
from persistence.models import HeatPumpSimulation
class DBSetup:
def __init__(self, db_name, app_env, dotenv_path):
repo = BaseRepo(db_name=db_name, app_env=app_env, dotenv_path=dotenv_path)
City.__table__.create(bind=repo.engine, checkfirst=True)
HeatPumpSimulation.__table__.create(bind=repo.engine, checkfirst=True)