Skip to content

Commit

Permalink
fix(deamon): create bookie db if not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
charitarthchugh committed Jul 23, 2022
1 parent d86a38f commit bbbddcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/bookie_backend/data/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

home = os.environ["HOME"]
path = Path(f"{home}/.local/share/bookie/bookie.sqlite")
if not path.exists():
path.touch()
SQLITE_DB_URL = f"sqlite:///{path}"

engine = create_engine(SQLITE_DB_URL, connect_args={"check_same_thread": False})
Expand Down

0 comments on commit bbbddcf

Please sign in to comment.