diff --git a/be/alembic/migrations.py b/be/alembic/migrations.py index f943597..9bfc5d0 100644 --- a/be/alembic/migrations.py +++ b/be/alembic/migrations.py @@ -26,9 +26,9 @@ async def run_migrations(): async with engine.connect() as connection: # Get current database schema version - def do_get_current_rev(): + def do_get_current_rev(conn): migration_context = MigrationContext.configure( - connection, + conn, opts={ 'target_metadata': DatabaseBase.metadata, 'compare_type': True, @@ -40,9 +40,9 @@ async def run_migrations(): current_rev = await connection.run_sync(do_get_current_rev) # Run migrations - def do_upgrade(): + def do_upgrade(conn): migration_context = MigrationContext.configure( - connection, + conn, opts={ 'target_metadata': DatabaseBase.metadata, 'compare_type': True,