Remove internal_id attribute from instances table
internal_id attribute column from instances table is no longer used. This commit removes internal_id from object layer. In the later release, this can be removed from schema by adding migration script. Change-Id: Ia285a16a8fab38a61959df847d30bce2d60ad081 Closes-Bug: #1441242
This commit is contained in:
parent
480bd2b505
commit
94d5c886ba
|
@ -337,7 +337,12 @@ class Instance(BASE, NovaBase, models.SoftDeleteMixin):
|
||||||
# OpenStack compute cell name. This will only be set at the top of
|
# OpenStack compute cell name. This will only be set at the top of
|
||||||
# the cells tree and it'll be a full cell name such as 'api!hop1!hop2'
|
# the cells tree and it'll be a full cell name such as 'api!hop1!hop2'
|
||||||
cell_name = Column(String(255))
|
cell_name = Column(String(255))
|
||||||
internal_id = Column(Integer)
|
|
||||||
|
# NOTE(pumaranikar): internal_id attribute is no longer used (bug 1441242)
|
||||||
|
# Hence, removing from object layer in current release (Ocata) and will
|
||||||
|
# treated as deprecated. The column can be removed from schema with
|
||||||
|
# a migration at the start of next release.
|
||||||
|
# internal_id = Column(Integer)
|
||||||
|
|
||||||
# Records whether an instance has been deleted from disk
|
# Records whether an instance has been deleted from disk
|
||||||
cleaned = Column(Integer, default=0)
|
cleaned = Column(Integer, default=0)
|
||||||
|
|
|
@ -765,7 +765,7 @@ class NovaMigrationsCheckers(test_migrations.ModelsMigrationsSync,
|
||||||
def removed_column(element):
|
def removed_column(element):
|
||||||
# Define a whitelist of columns that would be removed from the
|
# Define a whitelist of columns that would be removed from the
|
||||||
# DB at a later release.
|
# DB at a later release.
|
||||||
column_whitelist = {'instances': ['scheduled_at']}
|
column_whitelist = {'instances': ['scheduled_at', 'internal_id']}
|
||||||
|
|
||||||
if element[0] != 'remove_column':
|
if element[0] != 'remove_column':
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue