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:
authorGretaD <gretadoci@gmail.com>2021-02-11 20:32:08 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-26 19:59:39 +0300
commit5677ea6d1a234060466c34b181bf86f9fd8b8200 (patch)
tree3edc34eaecfb04ff4917076c34d4ed8a8f57f779 /lib/Migration
parent06842c1ad4fc1b73218d7a49b72343ce6ac92b48 (diff)
Add trusted domain
Signed-off-by: GretaD <gretadoci@gmail.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version1090Date20210216154409.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Migration/Version1090Date20210216154409.php b/lib/Migration/Version1090Date20210216154409.php
new file mode 100644
index 000000000..4a793a142
--- /dev/null
+++ b/lib/Migration/Version1090Date20210216154409.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OCA\Mail\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version1090Date20210216154409 extends SimpleMigrationStep {
+
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('mail_trusted_senders');
+ $table->addColumn('type', 'string', [
+ 'notnull' => true,
+ 'default' => 'individual',
+ ]);
+ $table->addIndex(['type'], 'mail_trusted_senders_type');
+
+ return $schema;
+ }
+}