diff --git a/data/migrations/versions/3f4fe1194671_backfill_the_namespace_user_fields.py b/data/migrations/versions/3f4fe1194671_backfill_the_namespace_user_fields.py index 7c3b7924b..5156e5b01 100644 --- a/data/migrations/versions/3f4fe1194671_backfill_the_namespace_user_fields.py +++ b/data/migrations/versions/3f4fe1194671_backfill_the_namespace_user_fields.py @@ -16,7 +16,7 @@ import sqlalchemy as sa def upgrade(tables): conn = op.get_bind() - conn.execute('update repository set namespace_user_id = (select id from user where user.username == repository.namespace) where namespace_user_id is NULL') + conn.execute('update repository set namespace_user_id = (select id from user where user.username = repository.namespace) where namespace_user_id is NULL') op.alter_column('repository', 'namespace_user_id', nullable=False) op.create_index('repository_namespace_user_id_name', 'repository', ['namespace_user_id', 'name'], unique=True)