From 7c9fcc434ff9a82bf51b831335e6d11a29c21af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 27 Nov 2020 12:53:51 +0100 Subject: [PATCH] Add missing mount_id index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/Migrations/Version13000Date20170718121200.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 218497668f..dc59d43e81 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -122,6 +122,15 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { $table->addIndex(['root_id'], 'mounts_root_index'); $table->addIndex(['mount_id'], 'mounts_mount_id_index'); $table->addUniqueIndex(['user_id', 'root_id'], 'mounts_user_root_index'); + } else { + $table = $schema->getTable('mounts'); + $table->addColumn('mount_id', Types::BIGINT, [ + 'notnull' => false, + 'length' => 20, + ]); + if (!$table->hasIndex('mounts_mount_id_index')) { + $table->addIndex(['mount_id'], 'mounts_mount_id_index'); + } } if (!$schema->hasTable('mimetypes')) {