fix: update database URL to use 0.0.0.0 and adjust Alembic migration configurations

This commit is contained in:
Artem Kashaev
2025-11-27 12:36:49 +05:00
parent ad6283680b
commit 6d9387d1b4
4 changed files with 75 additions and 34 deletions
+8 -13
View File
@@ -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())