Replace DbMigrationError with DBMigrationError
because DbMigrationError is deprecated Change-Id: Id2473deb012e5def6cf361cb228882e6804bf119
This commit is contained in:
parent
290afe3a49
commit
cf04803e14
|
@ -100,7 +100,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)
|
||||
stamp('head', config=config)
|
||||
|
|
|
@ -247,7 +247,7 @@ class MigrationCheckersMixin(object):
|
|||
def test_upgrade_and_create_schema(self):
|
||||
with patch_with_engine(self.engine):
|
||||
self.migration_api.upgrade('2d1354bbf76e')
|
||||
self.assertRaises(db_exc.DbMigrationError,
|
||||
self.assertRaises(db_exc.DBMigrationError,
|
||||
self.migration_api.create_schema)
|
||||
|
||||
def test_upgrade_twice(self):
|
||||
|
|
Loading…
Reference in New Issue