diff options
author | Eric Fried <openstack@fried.cc> | 2020-02-19 11:31:16 -0600 |
---|---|---|
committer | Eric Fried <openstack@fried.cc> | 2020-02-25 15:40:50 -0600 |
commit | a5506b7d4c6230c5a6cd02d434eb3303c6495f22 (patch) | |
tree | 5895a6012f224258ee1abb58f6ce708c87524a1b | |
parent | f9cdeb8a986580662ad036c2a891c710a50cc6be (diff) | |
download | nova-a5506b7d4c6230c5a6cd02d434eb3303c6495f22.tar.gz |
Name Enums
alembic 1.4.0 seems to want us to provide a name for all EnumZ.
Change-Id: Ie00bb6d33eb1860af1e918a5478aa540051263a6
-rw-r--r-- | nova/db/sqlalchemy/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 8ae9415145..d90bb96e68 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -308,7 +308,7 @@ class Instance(BASE, NovaBase, models.SoftDeleteMixin): # locked is superseded by locked_by and locked is not really # necessary but still used in API code so it remains. locked = Column(Boolean) - locked_by = Column(Enum('owner', 'admin')) + locked_by = Column(Enum('owner', 'admin', name='instances0locked_by')) os_type = Column(String(255)) architecture = Column(String(255)) @@ -792,7 +792,7 @@ class Migration(BASE, NovaBase, models.SoftDeleteMixin): # TODO(_cerberus_): enum status = Column(String(255)) migration_type = Column(Enum('migration', 'resize', 'live-migration', - 'evacuation'), + 'evacuation', name='migration_type'), nullable=True) hidden = Column(Boolean, default=False) memory_total = Column(BigInteger, nullable=True) |