]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix 033 add encryption unique key migration
authorAnton Arefiev <aarefiev@mirantis.com>
Wed, 18 Mar 2015 12:59:59 +0000 (14:59 +0200)
committerAnton Arefiev <aarefiev@mirantis.com>
Tue, 21 Jul 2015 08:47:10 +0000 (11:47 +0300)
commit5f8a616b15b70ddba6a64689b547521c91b95c84
treea207681eb44c655f80b48279cbc0b1a803bb76bc
parentd84c501a60e44e9db78bf257cf449cf38f450a70
Fix 033 add encryption unique key migration

SQLite doesn't support 'drop constraint' statament. So it notifies:
SAWarning: Table 'encryption' specifies columns 'volume_type_id'
as primary_key=True, not matching locally specified columns
'encryption_id'; setting the current primary key columns to
'encryption_id'. This warning may become an exception in a future
release.

Add new strategy for sqlite upgrade: table is renamed to temporary
name, new table is created followed by INSERT statements, and
renamed to original one.

Change-Id: I723fdadb946f6944dde03954409899a9ddc3ee0e
Closes-Bug: #1431374
cinder/db/sqlalchemy/migrate_repo/versions/033_add_encryption_unique_key.py
tools/lintstack.py