enh: ENABLE_DB_MIGRATIONS

This commit is contained in:
Timothy Jaeryang Baek committed 2025-12-23 10:14:54 +04:00
1 parent 117b1bfa65
commit 9824f0e333
3 files changed
+8 -2

No files matched your search

+3 -1
View File
@@ -14,6 +14,7 @@ from open_webui.env import (
DATABASE_POOL_SIZE,
DATABASE_POOL_TIMEOUT,
DATABASE_ENABLE_SQLITE_WAL,
ENABLE_DB_MIGRATIONS,
)
from peewee_migrate import Router
from sqlalchemy import Dialect, create_engine, MetaData, event, types
@@ -75,7 +76,8 @@ def handle_peewee_migration(DATABASE_URL):
assert db.is_closed(), "Database connection is still open."
handle_peewee_migration(DATABASE_URL)
if ENABLE_DB_MIGRATIONS:
handle_peewee_migration(DATABASE_URL)
SQLALCHEMY_DATABASE_URL = DATABASE_URL