This commit is contained in:
xyj 2023-12-02 11:56:11 +08:00
parent 628ba588c5
commit ced1b7db48
2 changed files with 4 additions and 1 deletions

3
create.py Normal file
View File

@ -0,0 +1,3 @@
from db.base import Base, engine
Base.metadata.create_all(bind=engine)

View File

@ -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}"