diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-24 12:48:00 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-24 12:48:00 +0000 |
| commit | a53b2f56aeb72127e4eb327c2b2dab0284e9f78f (patch) | |
| tree | e980198fd8b67cd1f0f6c3ea41ca601f77fe5a9e /nova | |
| parent | ce28a5f778389e7b5222f8c558037f91c3ec55b6 (diff) | |
| parent | 046b3f2e0c4b6a80428aea1e69957429d23783a0 (diff) | |
Merge "Updates migration 111 to work w/ Postgres."
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py | 5 |
1 files changed, 5 insertions, 0 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 c49db90cc..0c97112ce 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py @@ -45,6 +45,11 @@ def upgrade(migrate_engine): if dialect.startswith('sqlite'): aggregate_hosts.drop_column('host') aggregate_hosts.create_column(Column('host', String(255))) + elif dialect.startswith('postgres'): + ucon = UniqueConstraint('host', + name='aggregate_hosts_host_key', + table=aggregate_hosts) + ucon.drop() else: col = aggregate_hosts.c.host UniqueConstraint(col, name='host').drop() |
