Skip to content

Commit a458da7

Browse files
committed
Driver::getColumns() nativeType is not upper
1 parent 74feca4 commit a458da7

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Database/Drivers/Engines/MSSQLEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function getColumns(string $table): array
121121
$columns[] = [
122122
'name' => $row['COLUMN_NAME'],
123123
'table' => $table,
124-
'nativeType' => strtoupper($row['DATA_TYPE']),
124+
'nativeType' => $row['DATA_TYPE'],
125125
'size' => $row['CHARACTER_MAXIMUM_LENGTH'] ?? ($row['NUMERIC_PRECISION'] ?? null),
126126
'unsigned' => false,
127127
'nullable' => $row['IS_NULLABLE'] === 'YES',

src/Database/Drivers/Engines/MySQLEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function getColumns(string $table): array
121121
$columns[] = [
122122
'name' => $row['field'],
123123
'table' => $table,
124-
'nativeType' => strtoupper($type[0]),
124+
'nativeType' => $type[0],
125125
'size' => isset($type[1]) ? (int) $type[1] : null,
126126
'nullable' => $row['null'] === 'YES',
127127
'default' => $row['default'],

src/Database/Drivers/Engines/PostgreSQLEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function getColumns(string $table): array
130130
SELECT
131131
a.attname::varchar AS name,
132132
c.relname::varchar AS table,
133-
upper(t.typname) AS nativeType,
133+
t.typname AS nativeType,
134134
CASE WHEN a.atttypmod = -1 THEN NULL ELSE a.atttypmod -4 END AS size,
135135
NOT (a.attnotnull OR t.typtype = 'd' AND t.typnotnull) AS nullable,
136136
pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass)::varchar AS default,

src/Database/Drivers/Engines/SQLServerEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getColumns(string $table): array
123123
SELECT
124124
c.name AS name,
125125
o.name AS [table],
126-
UPPER(t.name) AS nativeType,
126+
t.name AS nativeType,
127127
NULL AS size,
128128
c.is_nullable AS nullable,
129129
OBJECT_DEFINITION(c.default_object_id) AS [default],

src/Database/Drivers/Engines/SQLiteEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function getColumns(string $table): array
157157
$columns[] = [
158158
'name' => $column,
159159
'table' => $table,
160-
'nativeType' => strtoupper($type[0]),
160+
'nativeType' => $type[0],
161161
'size' => isset($type[1]) ? (int) $type[1] : null,
162162
'nullable' => $row['notnull'] === 0,
163163
'default' => $row['dflt_value'],

0 commit comments

Comments
 (0)