Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jul 31, 2024
1 parent acf8795 commit d50f8c3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions library/Icinga/Application/MigrationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,21 @@ protected function load(): void

/** @var DbMigrationHook $hook */
foreach (Hook::all('DbMigration') as $hook) {
if (empty($hook->getMigrations())) {
continue;
try {
if (empty($hook->getMigrations())) {
continue;
}

$this->pendingMigrations[$hook->getModuleName()] = $hook;
} catch (\Throwable $e) {
//TODO: Show this message in the UI?
Logger::error(
'Failed to load database migrations for %s: %s',
$hook->getModuleName(),
$e->getMessage()
);
}

$this->pendingMigrations[$hook->getModuleName()] = $hook;
}

ksort($this->pendingMigrations);
Expand Down

0 comments on commit d50f8c3

Please sign in to comment.