diff --git a/create.py b/create.py new file mode 100644 index 0000000..2c18656 --- /dev/null +++ b/create.py @@ -0,0 +1,3 @@ +from db.base import Base, engine + +Base.metadata.create_all(bind=engine) \ No newline at end of file diff --git a/db/base.py b/db/base.py index f7e4b6c..31dc913 100755 --- a/db/base.py +++ b/db/base.py @@ -5,7 +5,7 @@ from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta from sqlalchemy.orm import sessionmaker import json -KB_ROOT_PATH = "./" +KB_ROOT_PATH = "/home/pi/" DB_ROOT_PATH = os.path.join(KB_ROOT_PATH, "lot_data.db") SQLALCHEMY_DATABASE_URI = f"sqlite:///{DB_ROOT_PATH}"