chore: comment out some lines to cause error during deployment
This commit is contained in:
parent
92f3fa6c7f
commit
de156f1cf9
@ -5,10 +5,10 @@ from sqlalchemy.orm import sessionmaker
|
||||
|
||||
# Create database directory if it doesn't exist
|
||||
DB_DIR = Path("/app") / "storage" / "db"
|
||||
DB_DIR.mkdir(parents=True, exist_ok=True)
|
||||
# DB_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Database URL
|
||||
SQLALCHEMY_DATABASE_URL = f"sqlite:///{DB_DIR}/db.sqlite"
|
||||
# SQLALCHEMY_DATABASE_URL = f"sqlite:///{DB_DIR}/db.sqlite"
|
||||
|
||||
# Create engine
|
||||
engine = create_engine(
|
||||
@ -23,9 +23,9 @@ SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
Base = declarative_base()
|
||||
|
||||
# Dependency
|
||||
def get_db():
|
||||
db = SessionLocal()
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
# def get_db():
|
||||
# db = SessionLocal()
|
||||
# try:
|
||||
# yield db
|
||||
# finally:
|
||||
# db.close()
|
Loading…
x
Reference in New Issue
Block a user