summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Harney <eharney@redhat.com>2023-03-24 14:04:05 -0400
committerEric Harney <eharney@redhat.com>2023-03-30 13:29:33 +0000
commitb261fa205b7f956a8eecbcffe6703c8d7de4e418 (patch)
treeb9d677f28db2e9d193c0b274911192f3e0bec125
parent19250d3f24e64b28e1d079a81759d533e5c22753 (diff)
downloadcinder-b261fa205b7f956a8eecbcffe6703c8d7de4e418.tar.gz
DB: Align volumes_service_uuid index in model with migration
The migration specifies a column order of ('service_uuid', 'deleted'), make the model use the same order. Closes-Bug: #2012289 Change-Id: I2332bf4657761076c3d72e41d089ec014e73fb52
-rw-r--r--cinder/db/sqlalchemy/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py
index 5df343609..761d61ec9 100644
--- a/cinder/db/sqlalchemy/models.py
+++ b/cinder/db/sqlalchemy/models.py
@@ -314,7 +314,7 @@ class Volume(BASE, CinderBase):
__tablename__ = 'volumes'
__table_args__ = (
- sa.Index('volumes_service_uuid_idx', 'deleted', 'service_uuid'),
+ sa.Index('volumes_service_uuid_idx', 'service_uuid', 'deleted'),
# Speed up normal listings
sa.Index('volumes_deleted_project_id_idx', 'deleted', 'project_id'),
# Speed up service start, create volume from image when using direct