[project] extract low-level database functions into own module
This commit is contained in:
parent
f37e920e00
commit
d58ae7aad1
2 changed files with 8 additions and 8 deletions
8
src/teilchensammler_cli/database.py
Normal file
8
src/teilchensammler_cli/database.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from sqlmodel import SQLModel, create_engine
|
||||
|
||||
sqlite_url = "sqlite:///:memory:"
|
||||
engine = create_engine(sqlite_url, echo=True)
|
||||
|
||||
|
||||
def create_db_and_tables():
|
||||
SQLModel.metadata.create_all(engine)
|
||||
Loading…
Add table
Add a link
Reference in a new issue