Skip to content

Commit

Permalink
Merge "Fix migration on older postgres"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 18, 2014
2 parents 653efdd + 8c9c502 commit f2e6001
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -16,6 +16,7 @@
import re

from migrate.changeset import UniqueConstraint
from oslo.db import exception as db_exception
from sqlalchemy import and_, func, orm
from sqlalchemy import MetaData, Table
from sqlalchemy.exc import OperationalError, ProgrammingError
Expand All @@ -34,7 +35,7 @@ def upgrade(migrate_engine):
UniqueConstraint('image_id',
name=_get_original_keyname(migrate_engine.name),
table=image_members).drop()
except (OperationalError, ProgrammingError):
except (OperationalError, ProgrammingError, db_exception.DBError):
UniqueConstraint('image_id',
name=_infer_original_keyname(image_members),
table=image_members).drop()
Expand Down

0 comments on commit f2e6001

Please sign in to comment.