Skip to content
Merged
Changes from 2 commits
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
7 changes: 2 additions & 5 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected function loadTableForeignKeys(string $tableName): array

$foreignKeysList = $this->getPragmaForeignKeyList($tableName);
/** @psalm-var GroupedForeignKeyInfo $foreignKeysList */
$foreignKeysList = DbArrayHelper::index($foreignKeysList, null, ['table', 'id']);
$foreignKeysList = DbArrayHelper::arrange($foreignKeysList, ['table', 'id']);

foreach ($foreignKeysList as $table => $foreignKeysById) {
/**
Expand Down Expand Up @@ -453,11 +453,8 @@ private function loadColumn(array $info): ColumnInterface
private function loadTableColumnsInfo(string $tableName): array
{
$tableColumns = $this->getPragmaTableInfo($tableName);
/** @psalm-var ColumnInfo[] $tableColumns */
$tableColumns = array_map(array_change_key_case(...), $tableColumns);

/** @psalm-var ColumnInfo[] */
return DbArrayHelper::index($tableColumns, 'cid');
return array_map(array_change_key_case(...), $tableColumns);
}

/**
Expand Down