Skip to content

Commit

Permalink
Introduce alias type mapping
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <[email protected]>
  • Loading branch information
kamil-tekiela committed Jan 29, 2024
1 parent 0061af6 commit 485bce7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Types.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public function getIntegerTypes(): array

public function mapAliasToMysqlType(string $alias): string
{
return [
return match ($alias) {
'BOOL' => 'TINYINT',
'BOOLEAN' => 'TINYINT',
'CHARACTER VARYING' => 'VARCHAR',
Expand All @@ -746,7 +746,8 @@ public function mapAliasToMysqlType(string $alias): string
'LONG' => 'MEDIUMTEXT',
'MIDDLEINT' => 'MEDIUMINT',
'NUMERIC' => 'DECIMAL',
][$alias] ?? $alias;
default => $alias,
};
}

/**
Expand Down

0 comments on commit 485bce7

Please sign in to comment.