db2 driver updates
This commit is contained in:
@@ -136,12 +136,15 @@ class Db2SchemaBuilder extends Builder
|
||||
);
|
||||
|
||||
return array_map(static function ($row) {
|
||||
$type = trim($row->TYPENAME);
|
||||
$typeName = trim($row->TYPENAME);
|
||||
$type = $typeName === 'CHARACTER' ? 'CHAR' : $typeName;
|
||||
|
||||
if (in_array(strtoupper($type), ['VARCHAR', 'CHAR', 'VARGRAPHIC', 'GRAPHIC'])) {
|
||||
$type .= '(' . (int) $row->LENGTH . ')';
|
||||
} elseif (in_array(strtoupper($type), ['DECIMAL', 'NUMERIC'])) {
|
||||
$type .= '(' . (int) $row->LENGTH . ',' . (int) $row->SCALE . ')';
|
||||
} elseif (strtoupper($type) === 'TIMESTAMP') {
|
||||
$type .= '(' . (int) $row->SCALE . ')';
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user