mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -41,17 +41,11 @@ target_metadata = Auth.metadata
|
||||
# ... etc.
|
||||
|
||||
DB_URL = DATABASE_URL
|
||||
# Replace the postgres:// with postgresql://
|
||||
if "postgres://" in DB_URL:
|
||||
DB_URL = DB_URL.replace("postgres://", "postgresql://")
|
||||
|
||||
if DB_URL:
|
||||
config.set_main_option("sqlalchemy.url", DB_URL)
|
||||
|
||||
|
||||
print("DB_URL", DB_URL)
|
||||
|
||||
|
||||
def run_migrations_offline() -> None:
|
||||
"""Run migrations in 'offline' mode.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user