-
-
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.
Merge pull request #4910 from coollabsio/next
v4.0.0-beta.386
- Loading branch information
Showing
5 changed files
with
37 additions
and
11 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
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()); | ||
} | ||
} | ||
}; |
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
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