Infrastructure: Implement master/dev/vX branching, save git path, and fix username casing

This commit is contained in:
Daniel Bedeleanu
2026-04-10 21:51:22 +03:00
parent 93edcc261b
commit 8a3783c7e9
3397 changed files with 57402 additions and 98 deletions

View File

@@ -2,10 +2,16 @@ from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, declarative_base
import os
# Create data directory if it doesn't exist
os.makedirs("data", exist_ok=True)
# Get absolute path for the backend directory
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_DIR = os.path.join(BASE_DIR, "data")
SQLALCHEMY_DATABASE_URL = "sqlite:///./data/inventory.db"
# Create data directory if it doesn't exist in the backend folder
os.makedirs(DATA_DIR, exist_ok=True)
# Handle absolute path for SQLite (needs 4 slashes on Unix)
db_path = os.path.join(DATA_DIR, "inventory.db")
SQLALCHEMY_DATABASE_URL = f"sqlite:////{db_path}"
# connect_args={"check_same_thread": False} is required for SQLite in FastAPI/Starlette
engine = create_engine(