Follow Up: Default type overrides

Remove redundant unqiue constraint (as it's already primary key)
Correct spacing of code block in doc

Change-Id: I726d0a6ddb3db3092a004b6f5e74bb6d9bd3db74
This commit is contained in:
Rajat Dhasmana 2020-09-17 09:05:54 +00:00
parent fb7edff4d0
commit 14a552c10e
3 changed files with 4 additions and 4 deletions

View File

@ -32,8 +32,8 @@ def upgrade(migrate_engine):
Column('deleted_at', DateTime), Column('deleted_at', DateTime),
Column('volume_type_id', String(36), Column('volume_type_id', String(36),
ForeignKey('volume_types.id'), index=True), ForeignKey('volume_types.id'), index=True),
Column('project_id', String(length=255), unique=True, Column('project_id', String(length=255), primary_key=True,
primary_key=True, nullable=False), nullable=False),
Column('deleted', Boolean(create_constraint=True, name=None)), Column('deleted', Boolean(create_constraint=True, name=None)),
mysql_engine='InnoDB', mysql_engine='InnoDB',
mysql_charset='utf8' mysql_charset='utf8'

View File

@ -518,7 +518,7 @@ class DefaultVolumeTypes(BASE, CinderBase):
__tablename__ = "default_volume_types" __tablename__ = "default_volume_types"
volume_type_id = Column(String, ForeignKey('volume_types.id'), volume_type_id = Column(String, ForeignKey('volume_types.id'),
nullable=False, index=True) nullable=False, index=True)
project_id = Column(String(255), unique=True, primary_key=True) project_id = Column(String(255), primary_key=True)
volume_type = relationship( volume_type = relationship(
VolumeType, VolumeType,
foreign_keys=volume_type_id, foreign_keys=volume_type_id,

View File

@ -209,7 +209,7 @@ default_volume_type) can be checked with the following command:
.. code-block:: console .. code-block:: console
$ cinder type-default $ cinder type-default
There are 2 ways to set the default volume type: There are 2 ways to set the default volume type: