Trap migration error for modules if they don't exist

This commit is contained in:
Nabeel Shahzad
2021-05-27 16:14:13 -04:00
parent 5b10dca868
commit a9e5554dea
2 changed files with 14 additions and 6 deletions

View File

@@ -126,7 +126,11 @@ class ModuleService extends Service
'enabled' => 1,
]);
Artisan::call('module:migrate '.$module_name, ['--force' => true]);
try {
Artisan::call('module:migrate '.$module_name, ['--force' => true]);
} catch (Exception $e) {
Log::error('Error running migration for '.$module_name.'; error='.$e);
}
return true;
}