DNM: Debugging

Change-Id: I6931d274dbe5e3edcbaba7c621744c3a83acc364
This commit is contained in:
Takashi Kajinami 2024-04-19 18:32:09 +09:00
parent d8d1bf432d
commit 5c85e8e19f
2 changed files with 5 additions and 1 deletions

View File

@ -162,9 +162,13 @@ class Connection(base.Connection):
engine = enginefacade.writer.get_engine()
ctxt = migration.MigrationContext.configure(engine.connect())
current_version = ctxt.get_current_revision()
LOG.debug("current version: %s", str(current_version))
if current_version is None:
LOG.debug("Creating schema")
models.Base.metadata.create_all(engine, checkfirst=False)
LOG.debug("Schema created. Stamping ...")
command.stamp(cfg, "head")
LOG.debug("Stamped")
else:
command.upgrade(cfg, "head")

View File

@ -226,7 +226,7 @@ function init_aodh {
if is_service_enabled mysql postgresql; then
if [ "$AODH_BACKEND" = 'mysql' ] || [ "$AODH_BACKEND" = 'postgresql' ] ; then
recreate_database aodh
$AODH_BIN_DIR/aodh-dbsync
$AODH_BIN_DIR/aodh-dbsync --debug
fi
fi
}