Merge "Modify "extended_accelerator_requests" table "project_id" field."
This commit is contained in:
commit
64aef5dc87
@ -143,7 +143,9 @@ def upgrade():
|
|||||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('uuid', sa.String(length=36), nullable=False, unique=True),
|
sa.Column('uuid', sa.String(length=36), nullable=False, unique=True),
|
||||||
sa.Column('project_id', sa.String(length=255), nullable=False),
|
# NOTICE: we don't have project related constraints in Stein Release,
|
||||||
|
# set nullable=True but keep this field for further expansion.
|
||||||
|
sa.Column('project_id', sa.String(length=255), nullable=True),
|
||||||
sa.Column('state', state, nullable=False, default='Initial'),
|
sa.Column('state', state, nullable=False, default='Initial'),
|
||||||
sa.Column('device_profile_id', sa.Integer(),
|
sa.Column('device_profile_id', sa.Integer(),
|
||||||
sa.ForeignKey('device_profiles.id', ondelete="RESTRICT"),
|
sa.ForeignKey('device_profiles.id', ondelete="RESTRICT"),
|
||||||
|
@ -171,8 +171,9 @@ class DeviceProfile(Base):
|
|||||||
profile_json = Column(Text, nullable=False)
|
profile_json = Column(Text, nullable=False)
|
||||||
|
|
||||||
|
|
||||||
class ExtendedAcceleratorRequest(Base):
|
class ExtArq(Base):
|
||||||
"""Represents extended nova requests for attach related operations."""
|
"""ExtArq is the abbreviation of ExtendedAcceleratorRequest, it represents
|
||||||
|
extended nova requests for attach related operations."""
|
||||||
|
|
||||||
__tablename__ = 'extended_accelerator_requests'
|
__tablename__ = 'extended_accelerator_requests'
|
||||||
__table_args__ = (
|
__table_args__ = (
|
||||||
@ -187,7 +188,7 @@ class ExtendedAcceleratorRequest(Base):
|
|||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
uuid = Column(String(36), nullable=False, unique=True)
|
uuid = Column(String(36), nullable=False, unique=True)
|
||||||
project_id = Column(String(255), nullable=False)
|
project_id = Column(String(255), nullable=True)
|
||||||
state = Column(Enum('Initial', 'Bound', 'BindFailed', name='state'),
|
state = Column(Enum('Initial', 'Bound', 'BindFailed', name='state'),
|
||||||
nullable=False)
|
nullable=False)
|
||||||
device_profile_id = Column(Integer, ForeignKey('device_profiles.id',
|
device_profile_id = Column(Integer, ForeignKey('device_profiles.id',
|
||||||
|
Loading…
Reference in New Issue
Block a user