From 995cadeb27448f350e99236c91987f5486d5cedd Mon Sep 17 00:00:00 2001 From: Michael Trip Date: Fri, 9 Jan 2026 22:23:52 +0100 Subject: [PATCH] remove directory creation logic for SQLite database from create_app function --- app/__init__.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 3feae1b..25ddae2 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -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