diff --git a/data/migrations/versions/2fb36d4be80d_translate_the_queue_names_to_reference_.py b/data/migrations/versions/2fb36d4be80d_translate_the_queue_names_to_reference_.py index bdeb3345f..15b740cbf 100644 --- a/data/migrations/versions/2fb36d4be80d_translate_the_queue_names_to_reference_.py +++ b/data/migrations/versions/2fb36d4be80d_translate_the_queue_names_to_reference_.py @@ -35,12 +35,14 @@ def upgrade(tables): else: raise RuntimeError('Invalid queue name: %s' % item.queue_name) + op.create_index('repository_namespace_user_id', 'repository', ['namespace_user_id'], unique=False) op.drop_column('repository', 'namespace') def downgrade(tables): # Add the namespace column back in and fill it in op.add_column('repository', sa.Column('namespace', sa.String(length=255))) + op.drop_index('repository_namespace_user_id', table_name='repository') # Rename the namespace component of existing queue items to reference namespace strings with app.config['DB_TRANSACTION_FACTORY'](db):