fix: update database URL to use 0.0.0.0 and adjust Alembic migration configurations
This commit is contained in:
+8
-13
@@ -28,8 +28,8 @@ def run_migrations_offline() -> None:
|
||||
target_metadata=target_metadata,
|
||||
literal_binds=True,
|
||||
dialect_opts={"paramstyle": "named"},
|
||||
compare_type=True,
|
||||
compare_server_default=True,
|
||||
# compare_type=True,
|
||||
# compare_server_default=True,
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
@@ -41,8 +41,8 @@ def do_run_migrations(connection: Connection) -> None:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata,
|
||||
compare_type=True,
|
||||
compare_server_default=True,
|
||||
# compare_type=True,
|
||||
# compare_server_default=True,
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
@@ -67,12 +67,7 @@ async def run_migrations_online() -> None:
|
||||
await connectable.dispose()
|
||||
|
||||
|
||||
def main() -> None:
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
asyncio.run(run_migrations_online())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
asyncio.run(run_migrations_online())
|
||||
|
||||
Reference in New Issue
Block a user