diff --git a/h/migrations/versions/f29f80083c26_backfill_user_pubid_part_2.py b/h/migrations/versions/f29f80083c26_backfill_user_pubid_part_2.py index 3537eb52abc..d2d9a3c77bd 100644 --- a/h/migrations/versions/f29f80083c26_backfill_user_pubid_part_2.py +++ b/h/migrations/versions/f29f80083c26_backfill_user_pubid_part_2.py @@ -1,6 +1,7 @@ """Backfill user.pubid with unique values part 2.""" from alembic import op +from sqlalchemy.orm import sessionmaker from h.migrations.versions.f32200e2e496_backfill_user_pubid import backfill_users @@ -14,7 +15,7 @@ def upgrade(): - session = op.get_bind() + session = sessionmaker()(bind=op.get_bind()) backfill_users( session,