Merge "sqlalchemy: remove Ceilometer upgrade workaround"
This commit is contained in:
commit
e8eafdbba7
@ -20,7 +20,6 @@ import os.path
|
|||||||
from alembic import command
|
from alembic import command
|
||||||
from alembic import config
|
from alembic import config
|
||||||
from alembic import migration
|
from alembic import migration
|
||||||
from oslo_db import exception
|
|
||||||
from oslo_db.sqlalchemy import session as db_session
|
from oslo_db.sqlalchemy import session as db_session
|
||||||
from oslo_db.sqlalchemy import utils as oslo_sql_utils
|
from oslo_db.sqlalchemy import utils as oslo_sql_utils
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
@ -95,14 +94,7 @@ class Connection(base.Connection):
|
|||||||
ctxt = migration.MigrationContext.configure(engine.connect())
|
ctxt = migration.MigrationContext.configure(engine.connect())
|
||||||
current_version = ctxt.get_current_revision()
|
current_version = ctxt.get_current_revision()
|
||||||
if current_version is None:
|
if current_version is None:
|
||||||
try:
|
|
||||||
models.Base.metadata.create_all(engine, checkfirst=False)
|
models.Base.metadata.create_all(engine, checkfirst=False)
|
||||||
except exception.DBError:
|
|
||||||
# Assume tables exist from Ceilometer, take control
|
|
||||||
# FIXME(jd) Remove in Ocata
|
|
||||||
command.stamp(cfg, "12fe8fac9fe4")
|
|
||||||
command.upgrade(cfg, "head")
|
|
||||||
else:
|
|
||||||
command.stamp(cfg, "head")
|
command.stamp(cfg, "head")
|
||||||
else:
|
else:
|
||||||
command.upgrade(cfg, "head")
|
command.upgrade(cfg, "head")
|
||||||
|
Loading…
Reference in New Issue
Block a user