From 4f54f3e2a38fab5b71eb74100ffcc5716281ba8f Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Thu, 8 Apr 2021 11:24:37 +0200 Subject: [PATCH] Split migrations for backport Signed-off-by: Anna Larch Signed-off-by: Christoph Wurst --- .../Version1096Date20210407150016.php | 111 ++++++++++++++++++ .../Version1100Date20210406144257.php | 101 ---------------- .../Version1100Date20210409091311.php | 33 ++++++ 3 files changed, 144 insertions(+), 101 deletions(-) create mode 100644 lib/Migration/Version1096Date20210407150016.php delete mode 100644 lib/Migration/Version1100Date20210406144257.php create mode 100644 lib/Migration/Version1100Date20210409091311.php diff --git a/lib/Migration/Version1096Date20210407150016.php b/lib/Migration/Version1096Date20210407150016.php new file mode 100644 index 0000000000..b6f0dabf35 --- /dev/null +++ b/lib/Migration/Version1096Date20210407150016.php @@ -0,0 +1,111 @@ +hasTable('mail_accounts')) { + $table = $schema->getTable('mail_accounts'); + $table->changeColumn('provisioned', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('show_subscribed_only', [ + 'notnull' => false, + 'default' => false + ]); + $table = $schema->getTable('mail_accounts'); + $table->changeColumn('sieve_enabled', [ + 'notnull' => false, + 'default' => false + ]); + } + + if ($schema->hasTable('mail_classifiers')) { + $table = $schema->getTable('mail_classifiers'); + $table->changeColumn('active', [ + 'notnull' => false, + 'default' => false + ]); + } + + if ($schema->hasTable('mail_mailboxes')) { + $table = $schema->getTable('mail_mailboxes'); + $table->changeColumn('selectable', [ + 'notnull' => false, + 'default' => false + ]); + $table->changeColumn('sync_in_background', [ + 'notnull' => false, + 'default' => false + ]); + } + + if ($schema->hasTable('mail_messages')) { + $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; + } +} diff --git a/lib/Migration/Version1100Date20210406144257.php b/lib/Migration/Version1100Date20210406144257.php deleted file mode 100644 index 709d436d6b..0000000000 --- a/lib/Migration/Version1100Date20210406144257.php +++ /dev/null @@ -1,101 +0,0 @@ -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; - } -} diff --git a/lib/Migration/Version1100Date20210409091311.php b/lib/Migration/Version1100Date20210409091311.php new file mode 100644 index 0000000000..05e1c83526 --- /dev/null +++ b/lib/Migration/Version1100Date20210409091311.php @@ -0,0 +1,33 @@ +hasTable('mail_tags')) { + $table = $schema->getTable('mail_tags'); + $table->changeColumn('is_default_tag', [ + 'notnull' => false, + 'default' => false + ]); + } + return $schema; + } +}