File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
src/Codeception/Lib/Driver
unit/Codeception/Module/Db Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ public function getPrimaryKey(string $tableName): array
164
164
FROM pg_index i
165
165
JOIN pg_attribute a ON a.attrelid = i.indrelid
166
166
AND a.attnum = ANY(i.indkey)
167
- WHERE i.indrelid = ' {$ tableName }'::regclass
167
+ WHERE i.indrelid = ' \" {$ tableName }\" '::regclass
168
168
AND i.indisprimary " ;
169
169
$ stmt = $ this ->executeQuery ($ query , []);
170
170
$ columns = $ stmt ->fetchAll (PDO ::FETCH_ASSOC );
Original file line number Diff line number Diff line change @@ -448,6 +448,10 @@ CREATE TABLE "no_pk" (
448
448
" status" VARCHAR NOT NULL
449
449
);
450
450
451
+ CREATE TABLE "NoPk " (
452
+ " Status" VARCHAR NOT NULL
453
+ );
454
+
451
455
CREATE TABLE "order " (
452
456
" id" INTEGER NOT NULL PRIMARY KEY ,
453
457
" name" VARCHAR NOT NULL ,
Original file line number Diff line number Diff line change @@ -33,4 +33,10 @@ public function getConfig(): array
33
33
'populate ' => true
34
34
];
35
35
}
36
+
37
+ public function testHaveInDatabaseWithUppercaseTableName ()
38
+ {
39
+ $ testData = ['Status ' => 'test ' ];
40
+ $ this ->module ->haveInDatabase ('NoPk ' , $ testData );
41
+ }
36
42
}
You can’t perform that action at this time.
0 commit comments