fix(core): v1 parser versions trying to access application_id, while it is resourceable_id
fix(db): remove wrongly created, empty environmentvariables
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user