diff options
| author | Joe Gordon <jogo@cloudscaling.com> | 2012-09-19 20:54:33 +0000 |
|---|---|---|
| committer | Joe Gordon <jogo@cloudscaling.com> | 2012-09-19 21:51:36 +0000 |
| commit | a5dbdb53da470916248c8ef8715ef6e06dfa1d0f (patch) | |
| tree | 3c2f635a0a9bb86e98f2d576c916cba59e908acd /nova/db | |
| parent | 2934799fda4ca62337833a3ed736da5dce1210ae (diff) | |
Fix aggregate_hosts.host migration for sqlite
* Make sure data is not lost during migration
* Changes migration 111_general_aggregates
* Adds test for change
Fix bug 1053131
Change-Id: Idbf0cbd5fdb7758ea1794019807d83d159270cba
Diffstat (limited to 'nova/db')
| -rw-r--r-- | nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py b/nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py index 0c97112ce..df4a83843 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py @@ -43,8 +43,7 @@ def upgrade(migrate_engine): aggregate_hosts = Table('aggregate_hosts', meta, autoload=True) if dialect.startswith('sqlite'): - aggregate_hosts.drop_column('host') - aggregate_hosts.create_column(Column('host', String(255))) + aggregate_hosts.c.host.alter(unique=False) elif dialect.startswith('postgres'): ucon = UniqueConstraint('host', name='aggregate_hosts_host_key', |
