Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update core/Migrations/Version23000Date20211203110726.php
Co-authored-by: John Molakvoæ <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal and skjnldsv committed Dec 9, 2021
commit ac5bc2277ebf0f8988478c5bb231d51bf218bf5b
12 changes: 4 additions & 8 deletions core/Migrations/Version23000Date20211203110726.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
/** @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;
}
}