This commit is contained in:
Timothy J. Baek
2024-07-08 12:42:52 -07:00
parent 68d775e1ab
commit d3ef3a7494
3 changed files with 6 additions and 12 deletions

View File

@@ -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.