[WIP] Added installation to config
This commit is contained in:
11
app/api/config/actions/install.py
Normal file
11
app/api/config/actions/install.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from sqlalchemy import create_engine
|
||||
|
||||
from ....schema.config.base import Base
|
||||
from ....db.config.config import get_engine_configuration
|
||||
|
||||
def install():
|
||||
engine_string, echo = get_engine_configuration()
|
||||
engine = create_engine(engine_string, echo=echo)
|
||||
metadata = Base.metadata(engine)
|
||||
metadata.create_all()
|
||||
return engine
|
||||
Reference in New Issue
Block a user