From 0994b0f2dee1dcf940191b0e81a95c265d89eba4 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 23 May 2024 18:14:00 +0300 Subject: [PATCH] trigger migration --- src/Appwrite/Event/Migration.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Event/Migration.php b/src/Appwrite/Event/Migration.php index 478291829b..1bba6e6180 100644 --- a/src/Appwrite/Event/Migration.php +++ b/src/Appwrite/Event/Migration.php @@ -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 ]); } }