Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-05-31 12:59:34 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-06-07 14:34:04 +0300
commit0b0e90515137c4d16480d1c1064e9ccc72132416 (patch)
treeeb98dfca4dc634c86eb2b792a49d18c06af38c8e /lib/Migration
parent213c25884ed2162e8d25e8ca3b6a6c6255170ea1 (diff)
Fix sending erroneous message repeatedly
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version1124Date20220531094751.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/Migration/Version1124Date20220531094751.php b/lib/Migration/Version1124Date20220531094751.php
new file mode 100644
index 000000000..57f69bcd9
--- /dev/null
+++ b/lib/Migration/Version1124Date20220531094751.php
@@ -0,0 +1,54 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Mail\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version1124Date20220531094751 extends SimpleMigrationStep {
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $localMessageTable = $schema->getTable('mail_local_messages');
+ if (!$localMessageTable->hasColumn('failed')) {
+ $localMessageTable->addColumn('failed', 'boolean', [
+ 'notnull' => false,
+ 'default' => false,
+ ]);
+ }
+
+ return $schema;
+ }
+}