Changes: Fastapi sqlite location to app data directory
This commit is contained in:
parent
2ca22b9e77
commit
6500708452
1 changed files with 2 additions and 1 deletions
|
|
@ -1,9 +1,10 @@
|
|||
from contextlib import contextmanager
|
||||
import os
|
||||
from sqlalchemy import create_engine
|
||||
from sqlmodel import Session
|
||||
|
||||
|
||||
sql_url = "sqlite:///sqlite.db"
|
||||
sql_url = "sqlite:///" + os.path.join(os.getenv("APP_DATA_DIRECTORY"), "fastapi.db")
|
||||
sql_engine = create_engine(sql_url, connect_args={"check_same_thread": False})
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue