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

Version1090Date20210127160127.php « Migration « lib - github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eb3385e14f0ec48025b87f2cc5de9c2e7b21ea02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php

declare(strict_types=1);

namespace OCA\Mail\Migration;

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

class Version1090Date20210127160127 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_accounts');
		$table->addColumn('sieve_enabled', 'boolean', [
			'notnull' => false,
			'default' => false,
		]);
		$table->addColumn('sieve_host', 'string', [
			'notnull' => false,
			'length' => 64,
			'default' => null,
		]);
		$table->addColumn('sieve_port', 'string', [
			'notnull' => false,
			'length' => 6,
			'default' => null,
		]);
		$table->addColumn('sieve_ssl_mode', 'string', [
			'notnull' => false,
			'length' => 10,
			'default' => null,
		]);
		$table->addColumn('sieve_user', 'string', [
			'notnull' => false,
			'length' => 64,
			'default' => null,
		]);
		$table->addColumn('sieve_password', 'string', [
			'notnull' => false,
			'length' => 2048,
			'default' => null,
		]);

		return $schema;
	}
}