[REF] Refactor
This commit is contained in:
1
app/api/actions/__init__.py
Normal file
1
app/api/actions/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .install import install
|
||||
12
app/api/actions/install.py
Normal file
12
app/api/actions/install.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from ...schema.library.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=="true", future=True) # TODO
|
||||
metadata = Base.metadata
|
||||
metadata.create_all(engine)
|
||||
return engine
|
||||
Reference in New Issue
Block a user