Merge "Replace DbMigrationError with DBMigrationError"

This commit is contained in:
Jenkins 2017-09-06 14:37:50 +00:00 committed by Gerrit Code Review
commit f136a24087
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ def create_schema(config=None, engine=None):
# schema, it will only add the new tables, but leave
# existing as is. So we should avoid of this situation.
if version(engine=engine) is not None:
raise db_exc.DbMigrationError("DB schema is already under version"
raise db_exc.DBMigrationError("DB schema is already under version"
" control. Use upgrade() instead")
models.Base.metadata.create_all(engine)

View File

@ -664,7 +664,7 @@ class MigrationCheckersMixin(object):
def test_upgrade_and_create_schema(self):
with patch_with_engine(self.engine):
self.migration_api.upgrade('31baaf680d2b')
self.assertRaises(db_exc.DbMigrationError,
self.assertRaises(db_exc.DBMigrationError,
self.migration_api.create_schema)
def test_upgrade_twice(self):