mirror of
https://github.com/open-webui/open-webui.git
synced 2026-04-28 11:38:38 -05:00
fix: db
This commit is contained in:
@@ -80,6 +80,13 @@ handle_peewee_migration()
|
||||
|
||||
|
||||
SQLALCHEMY_DATABASE_URL = DATABASE_URL
|
||||
|
||||
# Replace the postgres:// with postgresql://
|
||||
if "postgres://" in SQLALCHEMY_DATABASE_URL:
|
||||
SQLALCHEMY_DATABASE_URL = SQLALCHEMY_DATABASE_URL.replace(
|
||||
"postgres://", "postgresql://"
|
||||
)
|
||||
|
||||
if "sqlite" in SQLALCHEMY_DATABASE_URL:
|
||||
engine = create_engine(
|
||||
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
|
||||
|
||||
Reference in New Issue
Block a user