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>2020-02-28 13:40:38 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-20 11:36:49 +0300
commit7ef27f18b637aee4b7956b7de0471abf0ba01818 (patch)
treeb6d49363cd30ea60ef4a03855c235382ebfb5b77 /lib/Migration
parent681857260cdabb283d6a3aea6e2f6e5f93c17fd0 (diff)
Simplify the virtual favorite inbox
* Remove the heavy-weight virtual flagged mailbox * Implement a favorites inbox as a simple filtered view * Refactor the sync logic so it work with filtered mailboxes Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version1030Date20200228105714.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Migration/Version1030Date20200228105714.php b/lib/Migration/Version1030Date20200228105714.php
new file mode 100644
index 000000000..0b68533d9
--- /dev/null
+++ b/lib/Migration/Version1030Date20200228105714.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OCA\Mail\Migration;
+
+use Closure;
+use OCP\IDBConnection;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version1030Date20200228105714 extends SimpleMigrationStep {
+
+ /** @var IDBConnection */
+ protected $connection;
+
+ public function __construct(IDBConnection $connection) {
+ $this->connection = $connection;
+ }
+
+ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
+ // Force a re-sync, so the old favorites inbox vanishes
+ $update = $this->connection->getQueryBuilder();
+ $update->update('mail_accounts')
+ ->set('last_mailbox_sync', $update->createNamedParameter(0));
+ $update->execute();
+ }
+
+}