From 9c7d733c0119f0b6e1053e646c2e63a7318e7cc3 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 23 Dec 2020 16:17:29 +0100 Subject: [PATCH] Also add missing oc_share_external.share_type column Signed-off-by: Vincent Petry --- .../lib/Migration/Version11300Date20201120141438.php | 6 ++++++ .../lib/Migration/Version21000Date20201223143245.php | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php index 077c825c0a..ff616022be 100644 --- a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php +++ b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php @@ -122,6 +122,12 @@ class Version11300Date20201120141438 extends SimpleMigrationStep { 'default' => -1, ]); } + if (!$table->hasColumn('share_type')) { + $table->addColumn('share_type', Types::INTEGER, [ + 'notnull' => false, + 'length' => 4, + ]); + } if ($table->hasColumn('lastscan')) { $table->dropColumn('lastscan'); } diff --git a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php index 3e9fda47c4..5dfdb09f1e 100644 --- a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php +++ b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php @@ -48,6 +48,13 @@ class Version21000Date20201223143245 extends SimpleMigrationStep { ]); $changed = true; } + if (!$table->hasColumn('share_type')) { + $table->addColumn('share_type', Types::INTEGER, [ + 'notnull' => false, + 'length' => 4, + ]); + $changed = true; + } if ($table->hasColumn('lastscan')) { $table->dropColumn('lastscan'); $changed = true;