diff --git a/glance/db/sqlalchemy/migrate_repo/versions/031_remove_duplicated_locations.py b/glance/db/sqlalchemy/migrate_repo/versions/031_remove_duplicated_locations.py index 3559ae4d74..a468aeb787 100644 --- a/glance/db/sqlalchemy/migrate_repo/versions/031_remove_duplicated_locations.py +++ b/glance/db/sqlalchemy/migrate_repo/versions/031_remove_duplicated_locations.py @@ -33,11 +33,6 @@ def upgrade(migrate_engine): .where(image_locations.c.value == il.c.value) .where(image_locations.c.meta_data == il.c.meta_data) .where(image_locations.c.deleted == False))) - .where((sql.select([func.count(image_locations.c.id)]) - .where(image_locations.c.image_id == il.c.image_id) - .where(image_locations.c.value == il.c.value) - .where(image_locations.c.meta_data == il.c.meta_data) - .where(image_locations.c.deleted == False)) > 1) .where(il.c.deleted == False) .execute() )