-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): v1 parser versions trying to access application_id, while …
…it is resourceable_id fix(db): remove wrongly created, empty environmentvariables
- Loading branch information
1 parent
185ddd4
commit 0851037
Showing
2 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
database/migrations/2025_01_22_101105_remove_wrongly_created_envs.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
use App\Models\EnvironmentVariable; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\Log; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
try { | ||
EnvironmentVariable::whereNull('resourceable_id')->each(function (EnvironmentVariable $environmentVariable) { | ||
$environmentVariable->delete(); | ||
}); | ||
} catch (\Exception $e) { | ||
Log::error('Failed to delete wrongly created environment variables: '.$e->getMessage()); | ||
} | ||
} | ||
}; |