]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add volumes table definition when migrating to 67
authorwanghao <wanghao749@huawei.com>
Tue, 8 Mar 2016 05:57:15 +0000 (13:57 +0800)
committerwanghao <wanghao749@huawei.com>
Tue, 8 Mar 2016 05:57:15 +0000 (13:57 +0800)
commit6b6249b5ff6112a7150f6f609480e268fe42ea4d
treee4a641ee283f0fdc5cdba2510f8246be380619f3
parenta63bfeac76c181f8a74f75658a9d14b1647a30e1
Add volumes table definition when migrating to 67

When migrating DB to 67 readd_iscsi_targets_table,
we will add foreign key "volumes.id", but we miss
to define the volumes table, that will cause the
migrating process fail: 'NoReferencedTableError'.

Fix this issue by adding volume table definition
before creating iscsi_targets table. test is
added as well.

Change-Id: Id0e0970517a5d3414e0ed124b2b7b3a5b1973761
Closes-Bug: #1554329
cinder/db/sqlalchemy/migrate_repo/versions/067_readd_iscsi_targets_table.py
cinder/tests/unit/test_migrations.py