From e9745dbc96a67c54b964b9a7ad55ed2108c489e9 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Fri, 26 Sep 2014 11:17:42 -0400 Subject: [PATCH] Fix the SQL migration. --- .../versions/3f4fe1194671_backfill_the_namespace_user_fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)