From: Pytal <24800714+Pytal@users.noreply.github.com> Date: Thu, 9 Dec 2021 16:26:10 +0000 (-0800) Subject: Update core/Migrations/Version23000Date20211203110726.php X-Git-Tag: v23.0.1rc1~38^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F30176%2Fhead;p=nextcloud-server.git Update core/Migrations/Version23000Date20211203110726.php Co-authored-by: John Molakvoæ Signed-off-by: Christopher Ng --- diff --git a/core/Migrations/Version23000Date20211203110726.php b/core/Migrations/Version23000Date20211203110726.php index 33685e872a3..caeb55a4db3 100644 --- a/core/Migrations/Version23000Date20211203110726.php +++ b/core/Migrations/Version23000Date20211203110726.php @@ -44,15 +44,11 @@ class Version23000Date20211203110726 extends SimpleMigrationStep { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - if ($schema->hasTable(self::TABLE_NAME)) { - $table = $schema->getTable(self::TABLE_NAME); - if ($table->hasIndex('user_id')) { - $table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx'); - return $schema; - } - return null; + $table = $schema->getTable(self::TABLE_NAME); + if ($table->hasIndex('user_id')) { + $table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx'); + return $schema; } - return null; } }