Skip to content

Commit 77760a9

Browse files
committed
Fix MySQL schema reflection when columns have expressions
Skip over empty columns when reflecting schema. Currently schema reflection doesn't support expressions for indexes. This isn't ideal but we are also missing schema generation and migration support for index expressions. Fixes #16727
1 parent f94f24b commit 77760a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Schema/MysqlSchemaDialect.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ public function convertIndexDescription(TableSchema $schema, array $row): void
238238
$name = $type = TableSchema::CONSTRAINT_PRIMARY;
239239
}
240240

241-
$columns[] = $row['Column_name'];
241+
if (strlen($row['Column_name'] ?? '')) {
242+
$columns[] = $row['Column_name'];
243+
}
242244

243245
if ($row['Index_type'] === 'FULLTEXT') {
244246
$type = TableSchema::INDEX_FULLTEXT;

0 commit comments

Comments
 (0)