fix: handle duplicate error instead of sql error

fix: set fqdns to null if you delete an app or a serviceapp
fix: make stucked resources a separate command
This commit is contained in:
Andras Bacsai
2024-01-30 09:48:51 +01:00
parent 3ae9501814
commit 9667cd4a7a
9 changed files with 316 additions and 297 deletions

View File

@@ -39,6 +39,7 @@ class Application extends BaseModel
]);
});
static::deleting(function ($application) {
$application->update(['fqdn' => null]);
$application->settings()->delete();
$storages = $application->persistentStorages()->get();
$server = data_get($application, 'destination.server');
@@ -52,8 +53,6 @@ class Application extends BaseModel
$application->environment_variables_preview()->delete();
});
}
// Build packs / deployment types
public function servers(): Collection
{