From ebe468e54fbd61c0e6cc959c61421c2122b5ac89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Thu, 4 Dec 2025 21:51:43 +0100 Subject: [PATCH] fix migration --- hindsight-api/alembic/env.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hindsight-api/alembic/env.py b/hindsight-api/alembic/env.py index 7dee2da8..754b1ce6 100644 --- a/hindsight-api/alembic/env.py +++ b/hindsight-api/alembic/env.py @@ -126,6 +126,7 @@ def run_migrations_online() -> None: with connectable.connect() as connection: # Also explicitly set read-write mode on this connection connection.execute(text("SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE")) + connection.commit() # Commit the SET command context.configure( connection=connection, @@ -135,6 +136,9 @@ def run_migrations_online() -> None: with context.begin_transaction(): context.run_migrations() + # Explicit commit to ensure changes are persisted (especially for Supabase) + connection.commit() + if context.is_offline_mode(): run_migrations_offline()