Skip to content

Commit b5628c1

Browse files
Merge pull request #18633 from kamil-tekiela/Introduce-type-mapping-on-master
Introduce alias type mapping
2 parents 49a8eb1 + 485bce7 commit b5628c1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Types.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ public function getIntegerTypes(): array
729729

730730
public function mapAliasToMysqlType(string $alias): string
731731
{
732-
return [
732+
return match ($alias) {
733733
'BOOL' => 'TINYINT',
734734
'BOOLEAN' => 'TINYINT',
735735
'CHARACTER VARYING' => 'VARCHAR',
@@ -746,7 +746,8 @@ public function mapAliasToMysqlType(string $alias): string
746746
'LONG' => 'MEDIUMTEXT',
747747
'MIDDLEINT' => 'MEDIUMINT',
748748
'NUMERIC' => 'DECIMAL',
749-
][$alias] ?? $alias;
749+
default => $alias,
750+
};
750751
}
751752

752753
/**

0 commit comments

Comments
 (0)