mirror of
https://gitlab.aachen.ccc.de/inventory/in.git
synced 2025-06-08 21:15:09 +02:00
initial commit
This commit is contained in:
commit
0961d0e47d
15 changed files with 564 additions and 0 deletions
14
database.py
Normal file
14
database.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
SQLALCHEMY_DATABASE_URL = "sqlite:///./inventory.sqlite3"
|
||||
|
||||
engine = create_engine(
|
||||
SQLALCHEMY_DATABASE_URL,
|
||||
connect_args = {"check_same_thread": False},
|
||||
echo=True
|
||||
)
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
|
||||
Base = declarative_base()
|
Loading…
Add table
Add a link
Reference in a new issue