diff options
author | Anna Larch <anna@nextcloud.com> | 2021-04-07 13:45:08 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2021-04-07 17:32:06 +0300 |
commit | 0c27b7705254f85aa34ae634d10332b3525ad9fe (patch) | |
tree | afbdb28b7b31376bfc8923a0f78090cbabb2fa7a /lib/Migration | |
parent | 3b4a09ef94750d344c340faa2493467308cfe511 (diff) |
Change provisioning column
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/Version0190Date20191118160843.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1020Date20191002091035.php | 16 | ||||
-rw-r--r-- | lib/Migration/Version1020Date20200206134751.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1040Date20200422142920.php | 21 | ||||
-rw-r--r-- | lib/Migration/Version1040Date20200506111214.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1040Date20200515080614.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1050Date20200923180030.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1080Date20210108093802.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1090Date20210127160127.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version1100Date20210406144257.php | 101 |
10 files changed, 127 insertions, 25 deletions
diff --git a/lib/Migration/Version0190Date20191118160843.php b/lib/Migration/Version0190Date20191118160843.php index 11624c166..74bbf6c91 100644 --- a/lib/Migration/Version0190Date20191118160843.php +++ b/lib/Migration/Version0190Date20191118160843.php @@ -45,7 +45,7 @@ class Version0190Date20191118160843 extends SimpleMigrationStep { $accountsTable = $schema->getTable('mail_accounts'); $accountsTable->addColumn('provisioned', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $accountsTable->changeColumn('inbound_password', [ diff --git a/lib/Migration/Version1020Date20191002091035.php b/lib/Migration/Version1020Date20191002091035.php index bd35180d1..c9d5d9d78 100644 --- a/lib/Migration/Version1020Date20191002091035.php +++ b/lib/Migration/Version1020Date20191002091035.php @@ -58,35 +58,35 @@ class Version1020Date20191002091035 extends SimpleMigrationStep { 'length' => 4, ]); $messagesTable->addColumn('flag_answered', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_deleted', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_draft', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_flagged', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_seen', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_forwarded', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_junk', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_notjunk', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('updated_at', 'integer', [ diff --git a/lib/Migration/Version1020Date20200206134751.php b/lib/Migration/Version1020Date20200206134751.php index a9765a016..b289f48dc 100644 --- a/lib/Migration/Version1020Date20200206134751.php +++ b/lib/Migration/Version1020Date20200206134751.php @@ -24,7 +24,7 @@ class Version1020Date20200206134751 extends SimpleMigrationStep { $messagesTable = $schema->getTable('mail_messages'); $messagesTable->addColumn('structure_analyzed', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_attachments', 'boolean', [ diff --git a/lib/Migration/Version1040Date20200422142920.php b/lib/Migration/Version1040Date20200422142920.php index ee8a39be4..799a6bafd 100644 --- a/lib/Migration/Version1040Date20200422142920.php +++ b/lib/Migration/Version1040Date20200422142920.php @@ -50,46 +50,47 @@ class Version1040Date20200422142920 extends SimpleMigrationStep { 'length' => 4, ]); $messagesTable->addColumn('flag_answered', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_deleted', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_draft', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_flagged', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_seen', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_forwarded', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_junk', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_notjunk', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('flag_attachments', 'boolean', [ 'notnull' => false, + 'default' => false, ]); $messagesTable->addColumn('flag_important', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('structure_analyzed', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $messagesTable->addColumn('preview_text', 'string', [ diff --git a/lib/Migration/Version1040Date20200506111214.php b/lib/Migration/Version1040Date20200506111214.php index 5f19ab931..4b1f3ad56 100644 --- a/lib/Migration/Version1040Date20200506111214.php +++ b/lib/Migration/Version1040Date20200506111214.php @@ -72,7 +72,7 @@ class Version1040Date20200506111214 extends SimpleMigrationStep { 'length' => 4, ]); $table->addColumn('active', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $table->addColumn('created_at', 'integer', [ diff --git a/lib/Migration/Version1040Date20200515080614.php b/lib/Migration/Version1040Date20200515080614.php index 20dc7c32b..2731505d8 100644 --- a/lib/Migration/Version1040Date20200515080614.php +++ b/lib/Migration/Version1040Date20200515080614.php @@ -25,7 +25,7 @@ class Version1040Date20200515080614 extends SimpleMigrationStep { $accountsTable = $schema->getTable('mail_accounts'); $accountsTable->addColumn('show_subscribed_only', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); diff --git a/lib/Migration/Version1050Date20200923180030.php b/lib/Migration/Version1050Date20200923180030.php index d925f4849..063e88ec6 100644 --- a/lib/Migration/Version1050Date20200923180030.php +++ b/lib/Migration/Version1050Date20200923180030.php @@ -24,7 +24,7 @@ class Version1050Date20200923180030 extends SimpleMigrationStep { $accountsTable = $schema->getTable('mail_mailboxes'); $accountsTable->addColumn('sync_in_background', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); diff --git a/lib/Migration/Version1080Date20210108093802.php b/lib/Migration/Version1080Date20210108093802.php index f6b303750..e68e2cadf 100644 --- a/lib/Migration/Version1080Date20210108093802.php +++ b/lib/Migration/Version1080Date20210108093802.php @@ -23,7 +23,7 @@ class Version1080Date20210108093802 extends SimpleMigrationStep { $messagesTable = $schema->getTable('mail_messages'); $messagesTable->addColumn('flag_mdnsent', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); diff --git a/lib/Migration/Version1090Date20210127160127.php b/lib/Migration/Version1090Date20210127160127.php index 8a52ae4fc..eb3385e14 100644 --- a/lib/Migration/Version1090Date20210127160127.php +++ b/lib/Migration/Version1090Date20210127160127.php @@ -22,7 +22,7 @@ class Version1090Date20210127160127 extends SimpleMigrationStep { $table = $schema->getTable('mail_accounts'); $table->addColumn('sieve_enabled', 'boolean', [ - 'notnull' => true, + 'notnull' => false, 'default' => false, ]); $table->addColumn('sieve_host', 'string', [ diff --git a/lib/Migration/Version1100Date20210406144257.php b/lib/Migration/Version1100Date20210406144257.php new file mode 100644 index 000000000..709d436d6 --- /dev/null +++ b/lib/Migration/Version1100Date20210406144257.php @@ -0,0 +1,101 @@ +<?php + +declare(strict_types=1); + +namespace OCA\Mail\Migration; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1100Date20210406144257 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->changeColumn('provisioned', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('show_subscribed_only', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('sieve_enabled', [ + 'notnull' => false, + 'default' => false + ]); + + $table = $schema->getTable('mail_classifiers'); + $table->changeColumn('active', [ + 'notnull' => false, + 'default' => false + ]); + + $table = $schema->getTable('mail_mailboxes'); + $table->changeColumn('selectable', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('sync_in_background', [ + 'notnull' => false, + 'default' => false + ]); + + $table = $schema->getTable('mail_messages'); + $table->changeColumn('flag_answered', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_deleted', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_draft', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_flagged', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_seen', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_forwarded', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_junk', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_notjunk', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_important', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('flag_mdnsent', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('structure_analyzed', [ + 'notnull' => false, + 'default' => false + ]); + return $schema; + } +} |