From ac5bc2277ebf0f8988478c5bb231d51bf218bf5b Mon Sep 17 00:00:00 2001 From: Pytal <24800714+Pytal@users.noreply.github.com> Date: Thu, 9 Dec 2021 08:26:10 -0800 Subject: Update core/Migrations/Version23000Date20211203110726.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: John Molakvoæ Signed-off-by: Christopher Ng --- core/Migrations/Version23000Date20211203110726.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'core') 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; } } -- cgit v1.2.3