fix(parser): use firstOrCreate instead of updateOrCreate for environment variables
Prevent unnecessary updates to existing environment variable records. The previous implementation would update matching records, but the intent is to retrieve or create the record without modifying existing ones.
This commit is contained in:
parent
a362282976
commit
0679e91c85
1 changed files with 1 additions and 1 deletions
|
|
@ -1940,7 +1940,7 @@ function serviceParser(Service $resource): Collection
|
|||
|
||||
} else {
|
||||
$value = generateEnvValue($command, $resource);
|
||||
$resource->environment_variables()->updateOrCreate([
|
||||
$resource->environment_variables()->firstOrCreate([
|
||||
'key' => $key->value(),
|
||||
'resourceable_type' => get_class($resource),
|
||||
'resourceable_id' => $resource->id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue