From 344de3c0f9f9eb3fe03a96d09c07ba57318b79c4 Mon Sep 17 00:00:00 2001 From: Misha Tomilov Date: Thu, 16 Jan 2025 09:51:48 +0100 Subject: [PATCH] Fix migration to backfill user.pubid column part 2 --- .../versions/f29f80083c26_backfill_user_pubid_part_2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,