]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update core/Migrations/Version23000Date20211203110726.php 30176/head
authorPytal <24800714+Pytal@users.noreply.github.com>
Thu, 9 Dec 2021 16:26:10 +0000 (08:26 -0800)
committerChristopher Ng <chrng8@gmail.com>
Thu, 9 Dec 2021 23:07:30 +0000 (23:07 +0000)
Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
core/Migrations/Version23000Date20211203110726.php

index 33685e872a33a916793ebc7fe59445ae4fd6cecf..caeb55a4db3b9b5ae0089d345c0de29be1e7339c 100644 (file)
@@ -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;
        }
 }