|
@@ 1071-1082 (lines=12) @@
|
| 1068 |
|
|
| 1069 |
|
$changed = false; |
| 1070 |
|
$indexColumns = []; |
| 1071 |
|
foreach ($index->getColumns() as $columnName) { |
| 1072 |
|
$normalizedColumnName = strtolower($columnName); |
| 1073 |
|
if ( ! isset($columnNames[$normalizedColumnName])) { |
| 1074 |
|
unset($indexes[$key]); |
| 1075 |
|
continue 2; |
| 1076 |
|
} else { |
| 1077 |
|
$indexColumns[] = $columnNames[$normalizedColumnName]; |
| 1078 |
|
if ($columnName !== $columnNames[$normalizedColumnName]) { |
| 1079 |
|
$changed = true; |
| 1080 |
|
} |
| 1081 |
|
} |
| 1082 |
|
} |
| 1083 |
|
|
| 1084 |
|
if ($changed) { |
| 1085 |
|
$indexes[$key] = new Index($index->getName(), $indexColumns, $index->isUnique(), $index->isPrimary(), $index->getFlags()); |
|
@@ 1121-1132 (lines=12) @@
|
| 1118 |
|
foreach ($foreignKeys as $key => $constraint) { |
| 1119 |
|
$changed = false; |
| 1120 |
|
$localColumns = []; |
| 1121 |
|
foreach ($constraint->getLocalColumns() as $columnName) { |
| 1122 |
|
$normalizedColumnName = strtolower($columnName); |
| 1123 |
|
if ( ! isset($columnNames[$normalizedColumnName])) { |
| 1124 |
|
unset($foreignKeys[$key]); |
| 1125 |
|
continue 2; |
| 1126 |
|
} else { |
| 1127 |
|
$localColumns[] = $columnNames[$normalizedColumnName]; |
| 1128 |
|
if ($columnName !== $columnNames[$normalizedColumnName]) { |
| 1129 |
|
$changed = true; |
| 1130 |
|
} |
| 1131 |
|
} |
| 1132 |
|
} |
| 1133 |
|
|
| 1134 |
|
if ($changed) { |
| 1135 |
|
$foreignKeys[$key] = new ForeignKeyConstraint($localColumns, $constraint->getForeignTableName(), $constraint->getForeignColumns(), $constraint->getName(), $constraint->getOptions()); |