]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add missing mount_id index
authorJulius Härtl <jus@bitgrid.net>
Fri, 27 Nov 2020 11:53:51 +0000 (12:53 +0100)
committerJulius Härtl <jus@bitgrid.net>
Mon, 14 Dec 2020 10:12:51 +0000 (11:12 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
core/Migrations/Version13000Date20170718121200.php

index 218497668f964e91c19d648db24c97d8ef776ab5..dc59d43e81b93d7c8c816c6e076382a740192a4a 100644 (file)
@@ -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')) {