diff options
author | Anna Larch <anna@nextcloud.com> | 2021-07-06 15:03:25 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2021-07-06 15:42:34 +0300 |
commit | 60cfcf4679d6b32d629f1991bf9b4cd1b9306859 (patch) | |
tree | ad8e8479f81692be5f91dac327529808c87874ef /lib/Migration | |
parent | 8cd3433dc1b5771d7f3ef3e1ebde2e44f39f7b97 (diff) |
Add method exists check to migration
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/Version1100Date20210512142306.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Migration/Version1100Date20210512142306.php b/lib/Migration/Version1100Date20210512142306.php index 38d0de51c..453d07ced 100644 --- a/lib/Migration/Version1100Date20210512142306.php +++ b/lib/Migration/Version1100Date20210512142306.php @@ -31,6 +31,11 @@ class Version1100Date20210512142306 extends SimpleMigrationStep { * @param array $options */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { + if (!method_exists($this->mailboxMapper, 'findAllIds')) { + $output->warning('New Mail code hasn\'t been loaded yet, skipping tag migration. Please run `occ mail:tags:migration-jobs` after the upgrade.'); + return; + } + foreach ($this->mailboxMapper->findAllIds() as $mailboxId) { $this->jobList->add(MigrateImportantJob::class, ['mailboxId' => $mailboxId]); } |