diff --git a/alembic/versions/1b6d7dc5600a_versioning_passwords.py b/alembic/versions/1b6d7dc5600a_versioning_passwords.py index ff1aced..d134690 100644 --- a/alembic/versions/1b6d7dc5600a_versioning_passwords.py +++ b/alembic/versions/1b6d7dc5600a_versioning_passwords.py @@ -17,11 +17,10 @@ from pagure.lib import model def upgrade(): - engine = op.get_bind().engine - session = sa.orm.scoped_session(sa.orm.sessionmaker(bind=engine)) - session.query(model.User).update( - {model.User.password: '$1$' + model.User.password}, synchronize_session=False) - session.commit() + engine = op.get_bind().engine + session = sa.orm.scoped_session(sa.orm.sessionmaker(bind=engine)) + session.query(model.User).update({model.User.password: '$1$' + model.User.password}, synchronize_session=False); + session.commit() def downgrade():