File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ protected function checkInformationSchema(string $tableName): Iterator
109109 if (null === $ this ->stmt ) {
110110 $ this ->stmt = $ this ->pdo ->prepare (
111111 <<<'PSQL'
112- SELECT column_name, column_default, is_nullable
112+ SELECT COLUMN_NAME, COLUMN_DEFAULT, IS_NULLABLE
113113 FROM information_schema.columns
114114 WHERE table_name = ?
115115PSQL
@@ -119,12 +119,10 @@ protected function checkInformationSchema(string $tableName): Iterator
119119 $ this ->stmt ->execute ([$ tableName ]);
120120 $ result = $ this ->stmt ->fetchAll (PDO ::FETCH_ASSOC );
121121
122- // pgsql and mysql have a similar named but different information schema, with different cased key-words
123- /** @var array{column_default?: string, column_name: string, is_nullable: string} $row */ // @phpstan-ignore varTag.type
124122 foreach ($ result as $ row ) {
125- $ default = $ row ['column_default ' ] ?? '' ;
126- $ columnName = $ row ['column_name ' ];
127- $ isNullable = 'YES ' === $ row ['is_nullable ' ];
123+ $ default = $ row ['COLUMN_DEFAULT ' ] ?? '' ;
124+ $ columnName = $ row ['COLUMN_NAME ' ];
125+ $ isNullable = 'YES ' === $ row ['IS_NULLABLE ' ];
128126
129127 if (! $ isNullable ) {
130128 yield $ columnName => PgsqlTypeMapper::FLAG_NOT_NULL ;
You can’t perform that action at this time.
0 commit comments