|
@@ 1031-1042 (lines=12) @@
|
| 1028 |
|
|
| 1029 |
|
$changed = false; |
| 1030 |
|
$indexColumns = []; |
| 1031 |
|
foreach ($index->getColumns() as $columnName) { |
| 1032 |
|
$normalizedColumnName = strtolower($columnName); |
| 1033 |
|
if ( ! isset($columnNames[$normalizedColumnName])) { |
| 1034 |
|
unset($indexes[$key]); |
| 1035 |
|
continue 2; |
| 1036 |
|
} else { |
| 1037 |
|
$indexColumns[] = $columnNames[$normalizedColumnName]; |
| 1038 |
|
if ($columnName !== $columnNames[$normalizedColumnName]) { |
| 1039 |
|
$changed = true; |
| 1040 |
|
} |
| 1041 |
|
} |
| 1042 |
|
} |
| 1043 |
|
|
| 1044 |
|
if ($changed) { |
| 1045 |
|
$indexes[$key] = new Index($index->getName(), $indexColumns, $index->isUnique(), $index->isPrimary(), $index->getFlags()); |
|
@@ 1081-1092 (lines=12) @@
|
| 1078 |
|
foreach ($foreignKeys as $key => $constraint) { |
| 1079 |
|
$changed = false; |
| 1080 |
|
$localColumns = []; |
| 1081 |
|
foreach ($constraint->getLocalColumns() as $columnName) { |
| 1082 |
|
$normalizedColumnName = strtolower($columnName); |
| 1083 |
|
if ( ! isset($columnNames[$normalizedColumnName])) { |
| 1084 |
|
unset($foreignKeys[$key]); |
| 1085 |
|
continue 2; |
| 1086 |
|
} else { |
| 1087 |
|
$localColumns[] = $columnNames[$normalizedColumnName]; |
| 1088 |
|
if ($columnName !== $columnNames[$normalizedColumnName]) { |
| 1089 |
|
$changed = true; |
| 1090 |
|
} |
| 1091 |
|
} |
| 1092 |
|
} |
| 1093 |
|
|
| 1094 |
|
if ($changed) { |
| 1095 |
|
$foreignKeys[$key] = new ForeignKeyConstraint($localColumns, $constraint->getForeignTableName(), $constraint->getForeignColumns(), $constraint->getName(), $constraint->getOptions()); |