Update on failed

This commit is contained in:
fogelito 2024-08-07 16:58:00 +03:00
parent 0ac5e2aa76
commit f12a578efe

View file

@ -374,9 +374,6 @@ class Migrations extends Action
$log->addTag('migrationErrors', json_encode($errorMessages));
}
} finally {
$destination->error();
$source->error();
if (! $tempAPIKey->isEmpty()) {
$this->removeAPIKey($tempAPIKey);
}
@ -384,6 +381,9 @@ class Migrations extends Action
$this->updateMigrationDocument($migration, $projectDocument);
if ($migration->getAttribute('status', '') == 'failed') {
$destination->error();
$source->error();
throw new Exception('Migration failed');
}
}