From 353b2505604cfe407e2b9910431b0471453fffd7 Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Mon, 1 Dec 2014 10:51:29 -0800 Subject: [PATCH] Add missing indexes from 203 migration to model Migration 203 added two new indexes to existing tables, but did not update the model to include them. Change-Id: If63e8f6c34bb7e4e43cbbda82346e2caffc8eeff Partially-implements: blueprint validate-migrations-and-model --- nova/db/sqlalchemy/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 45d0e4d08f..53a7bb5120 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -472,6 +472,7 @@ class QuotaUsage(BASE, NovaBase): __tablename__ = 'quota_usages' __table_args__ = ( Index('ix_quota_usages_project_id', 'project_id'), + Index('ix_quota_usages_user_id_deleted', 'user_id', 'deleted'), ) id = Column(Integer, primary_key=True) @@ -497,6 +498,7 @@ class Reservation(BASE, NovaBase): Index('ix_reservations_project_id', 'project_id'), Index('reservations_uuid_idx', 'uuid'), Index('reservations_deleted_expire_idx', 'deleted', 'expire'), + Index('ix_reservations_user_id_deleted', 'user_id', 'deleted'), ) id = Column(Integer, primary_key=True, nullable=False) uuid = Column(String(36), nullable=False)