@@ -50,7 +50,9 @@ class FixtureMigration(declarative_base):
5050 bind : Mapped [str ] = mapped_column (String (), primary_key = True )
5151 module_name : Mapped [str ] = mapped_column (String (), primary_key = True )
5252 signature : Mapped [str ] = mapped_column (String (), nullable = False )
53- alembic_revision : Mapped [str ] = mapped_column (String (), nullable = True , default = str (context .get_head_revision ()))
53+ alembic_head_revisions : Mapped [str ] = mapped_column (
54+ String (), nullable = True , default = str (context .get_head_revision ())
55+ )
5456
5557 processed_at : Mapped [datetime ] = mapped_column (
5658 DateTime (), nullable = False , default = datetime .now
@@ -260,9 +262,10 @@ async def a_migrate_fixtures(
260262 cls .logger .info (
261263 f"`{ fixture_module .__name__ } ` fixtures correctly created for `{ bind_name } ` bind"
262264 )
263- except Exception as e :
265+ except Exception :
264266 cls .logger .error (
265- f"`{ fixture_module .__name__ } ` fixtures failed to apply to `{ bind_name } ` bind" , exc_info = True
267+ f"`{ fixture_module .__name__ } ` fixtures failed to apply to `{ bind_name } ` bind" ,
268+ exc_info = True ,
266269 )
267270 await session .rollback ()
268271
@@ -397,8 +400,10 @@ async def run_migrations_online() -> None:
397400 for name , rec in engines .items ():
398401 logger .info (f"Migrating database { name } " )
399402 if isinstance (rec ["engine" ], AsyncEngine ):
403+
400404 def migration_callable (* args , ** kwargs ):
401405 return do_run_migration (* args , name = name , ** kwargs )
406+
402407 await rec ["connection" ].run_sync (migration_callable )
403408 else :
404409 do_run_migration (rec ["connection" ], name )
@@ -420,7 +425,8 @@ def migration_callable(*args, **kwargs):
420425 for name , rec in engines .items ():
421426 if isinstance (rec ["engine" ], AsyncEngine ):
422427 await FixtureHandler .a_migrate_fixtures (
423- bind_name = name , session = async_sessionmaker (bind = rec ["connection" ])
428+ bind_name = name ,
429+ session = async_sessionmaker (bind = rec ["connection" ]),
424430 )
425431 else :
426432 FixtureHandler .migrate_fixtures (
0 commit comments