Skip to content

Commit

Permalink
Merge pull request phpmyadmin#18633 from kamil-tekiela/Introduce-type…
Browse files Browse the repository at this point in the history
…-mapping-on-master

Introduce alias type mapping
  • Loading branch information
MauricioFauth authored Feb 6, 2024
2 parents 49a8eb1 + 485bce7 commit b5628c1
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 b5628c1

Please sign in to comment.