]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Updated "deleted" column of volume_type_access
authorSheel Rana <ranasheel2000@gmail.com>
Thu, 24 Dec 2015 05:31:12 +0000 (11:01 +0530)
committerSheel Rana <ranasheel2000@gmail.com>
Wed, 30 Dec 2015 13:02:16 +0000 (13:02 +0000)
commitb2cd356cacad84d925a5781c7ac6c56c68a73e04
treebaace6d379da12bf993ba1fbd75906e4ce3c8522
parent94d4b1594379ddedf23b802f477fefe4c38a7619
Updated "deleted" column of volume_type_access

Below changes are done in this commit:

a. replaced update()
update() is replaced with oslo.db's soft_delete() used in
volume_type_access_remove() function of sqlalchemy.db.api to keep
value of "id" in "deleted" column during volume type access remove
operation.
This bug will be solved after this change.

b. updated db schema
db schema of volume_type_projects if updated.
As tinyint can store maximum 127, "deleted" column type is modified
tinyint->integer so that it can store more than 128 entries in it.

c. release notes
release notes added to prohibit addition or deletion of
volume_type_access to a project during update operation.

UpgradeImpact
Closes-Bug: #1518363

Change-Id: I638a202dfb2b4febf1d623683de22df3b6dc2615
cinder/db/sqlalchemy/api.py
cinder/db/sqlalchemy/migrate_repo/versions/062_deleted_type_to_Integer.py [new file with mode: 0644]
cinder/db/sqlalchemy/migrate_repo/versions/062_sqlite_upgrade.sql [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/tests/unit/test_migrations.py
releasenotes/notes/add-del-volumeTypeAccess-b1c8cb14a9d14db3.yaml [new file with mode: 0644]