remove directory creation logic for SQLite database from create_app function
All checks were successful
Build and Push Image / build-and-push (push) Successful in 15s

This commit is contained in:
Michael Trip 2026-01-09 22:23:52 +01:00
parent 73227d5a6c
commit 995cadeb27

View file

@ -26,15 +26,6 @@ def create_app():
# Initialize database tables
with app.app_context():
# Create data directory if it doesn't exist
import os
db_path = app.config.get('SQLALCHEMY_DATABASE_URI', '')
if db_path.startswith('sqlite:///'):
db_file_path = db_path.replace('sqlite:///', '')
db_dir = os.path.dirname(db_file_path)
if db_dir and not os.path.exists(db_dir):
os.makedirs(db_dir, exist_ok=True)
db.create_all()
return app