trigger migration
This commit is contained in:
parent
ecfc5d68c2
commit
0994b0f2de
1 changed files with 16 additions and 1 deletions
|
@ -10,6 +10,7 @@ class Migration extends Event
|
|||
{
|
||||
protected string $type = '';
|
||||
protected ?Document $migration = null;
|
||||
protected ?Document $backup;
|
||||
|
||||
public function __construct(protected Connection $connection)
|
||||
{
|
||||
|
@ -33,6 +34,19 @@ class Migration extends Event
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets backup.
|
||||
*
|
||||
* @param Document $backup
|
||||
* @return self
|
||||
*/
|
||||
public function setBackup(Document $backup): self
|
||||
{
|
||||
$this->backup = $backup;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns set migration document for the function event.
|
||||
*
|
||||
|
@ -81,7 +95,8 @@ class Migration extends Event
|
|||
return $client->enqueue([
|
||||
'project' => $this->project,
|
||||
'user' => $this->user,
|
||||
'migration' => $this->migration
|
||||
'migration' => $this->migration,
|
||||
'backup' => $this->backup
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue