rename schemalessAttrributes

This commit is contained in:
Andras Bacsai
2023-05-30 09:52:58 +02:00
parent bdb19dae89
commit 108c790cf4
8 changed files with 17 additions and 17 deletions

View File

@@ -38,7 +38,7 @@ class Deploy extends Component
queue_application_deployment(
application: $this->application,
metadata: [
extra_attributes: [
'deployment_uuid' => $this->deployment_uuid,
'application_uuid' => $this->application->uuid,
'force_rebuild' => $force,

View File

@@ -24,7 +24,7 @@ class Rollback extends Component
queue_application_deployment(
application: $this->application,
metadata: [
extra_attributes: [
'deployment_uuid' => $deployment_uuid,
'application_uuid' => $this->application->uuid,
'force_rebuild' => false,

View File

@@ -229,9 +229,9 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap
if ($next_found) {
dispatch(new ApplicationDeploymentJob(
application_deployment_queue_id: $next_found->id,
deployment_uuid: $next_found->metadata['deployment_uuid'],
application_uuid: $next_found->metadata['application_uuid'],
force_rebuild: $next_found->metadata['force_rebuild'],
deployment_uuid: $next_found->extra_attributes['deployment_uuid'],
application_uuid: $next_found->extra_attributes['application_uuid'],
force_rebuild: $next_found->extra_attributes['force_rebuild'],
));
}
}

View File

@@ -11,14 +11,14 @@ class ApplicationDeploymentQueue extends Model
protected $fillable = [
'application_id',
'status',
'metadata',
'extra_attributes',
];
public $casts = [
'metadata' => SchemalessAttributes::class,
'extra_attributes' => SchemalessAttributes::class,
];
public function scopeWithExtraAttributes(): Builder
{
return $this->metadata->modelScope();
return $this->extra_attributes->modelScope();
}
}