fix: set prepared threshold to none for migrations (#6912)

* Set prepared threshold to none for migrations

* [autofix.ci] apply automated fixes

* ruff

* revert search

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jordan Frazier 2025-03-05 11:56:14 -08:00 committed by GitHub
commit 72a8573b2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,7 @@ def run_migrations_offline() -> None:
literal_binds=True,
dialect_opts={"paramstyle": "named"},
render_as_batch=True,
prepare_threshold=None
)
with context.begin_transaction():
@ -71,7 +72,12 @@ def _sqlite_do_begin(conn):
def _do_run_migrations(connection):
context.configure(connection=connection, target_metadata=target_metadata, render_as_batch=True)
context.configure(
connection=connection,
target_metadata=target_metadata,
render_as_batch=True,
prepare_threshold=None
)
with context.begin_transaction():
if connection.dialect.name == "postgresql":