Skip to content

Commit 9135b17

Browse files
Pytalskjnldsv
andcommitted
Update core/Migrations/Version23000Date20211203110726.php
Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com> Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 3600b84 commit 9135b17

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

core/Migrations/Version23000Date20211203110726.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,11 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
4444
/** @var ISchemaWrapper $schema */
4545
$schema = $schemaClosure();
4646

47-
if ($schema->hasTable(self::TABLE_NAME)) {
48-
$table = $schema->getTable(self::TABLE_NAME);
49-
if ($table->hasIndex('user_id')) {
50-
$table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx');
51-
return $schema;
52-
}
53-
return null;
47+
$table = $schema->getTable(self::TABLE_NAME);
48+
if ($table->hasIndex('user_id')) {
49+
$table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx');
50+
return $schema;
5451
}
55-
5652
return null;
5753
}
5854
}

0 commit comments

Comments
 (0)