diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-05-24 20:44:11 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-05-24 20:44:11 +0000 |
| commit | 09526751a85535b3c4ebf7e062b0da10d1d1a99f (patch) | |
| tree | bfde40aa94c9c1d2b054e3ff57cf209ee6de722f | |
| parent | 5932412a36000d7ea6a4cddee136b7faff316de6 (diff) | |
| parent | 3f2f118fa4c03d9e120918afdc59472dedf9a02e (diff) | |
| download | nova-09526751a85535b3c4ebf7e062b0da10d1d1a99f.tar.gz nova-09526751a85535b3c4ebf7e062b0da10d1d1a99f.tar.xz nova-09526751a85535b3c4ebf7e062b0da10d1d1a99f.zip | |
Merge "Sync shadow table for 179 migration"
| -rw-r--r-- | nova/db/sqlalchemy/migrate_repo/versions/181_fix_179_migration_sync_shadow_table.py | 28 | ||||
| -rw-r--r-- | nova/tests/test_migrations.py | 3 |
2 files changed, 31 insertions, 0 deletions
diff --git a/nova/db/sqlalchemy/migrate_repo/versions/181_fix_179_migration_sync_shadow_table.py b/nova/db/sqlalchemy/migrate_repo/versions/181_fix_179_migration_sync_shadow_table.py new file mode 100644 index 000000000..2e8af266d --- /dev/null +++ b/nova/db/sqlalchemy/migrate_repo/versions/181_fix_179_migration_sync_shadow_table.py @@ -0,0 +1,28 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2013 Mirantis, Inc. +# Copyright 2013 OpenStack Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# @author: Boris Pavlovic, Mirantis Inc + +from nova.db.sqlalchemy import utils + + +def upgrade(migrate_engine): + utils.change_deleted_column_type_to_id_type(migrate_engine, 'shadow_cells') + + +def downgrade(migrate_engine): + utils.change_deleted_column_type_to_boolean(migrate_engine, 'shadow_cells') diff --git a/nova/tests/test_migrations.py b/nova/tests/test_migrations.py index d78928790..da9e293a4 100644 --- a/nova/tests/test_migrations.py +++ b/nova/tests/test_migrations.py @@ -1332,6 +1332,9 @@ class TestNovaMigrations(BaseMigrationTestCase, CommonTestsMixIn): self.assertTrue(db_utils.check_shadow_table(engine, "volume_usage_cache")) + def _check_181(self, engine, data): + self.assertTrue(db_utils.check_shadow_table(engine, 'cells')) + class TestBaremetalMigrations(BaseMigrationTestCase, CommonTestsMixIn): """Test sqlalchemy-migrate migrations.""" |
