fix migration
This commit is contained in:
parent
f69ea6ee61
commit
ebe468e54f
1 changed files with 4 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue