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
164164 FROM pg_index i
165165 JOIN pg_attribute a ON a.attrelid = i.indrelid
166166 AND a.attnum = ANY(i.indkey)
167- WHERE i.indrelid = ' {$ tableName }'::regclass
167+ WHERE i.indrelid = ' \" {$ tableName }\" '::regclass
168168 AND i.indisprimary " ;
169169 $ stmt = $ this ->executeQuery ($ query , []);
170170 $ columns = $ stmt ->fetchAll (PDO ::FETCH_ASSOC );
Original file line number Diff line number Diff line change @@ -448,6 +448,10 @@ CREATE TABLE "no_pk" (
448448 " status" VARCHAR NOT NULL
449449);
450450
451+ CREATE TABLE "NoPk " (
452+ " Status" VARCHAR NOT NULL
453+ );
454+
451455CREATE TABLE "order " (
452456 " id" INTEGER NOT NULL PRIMARY KEY ,
453457 " name" VARCHAR NOT NULL ,
Original file line number Diff line number Diff line change @@ -33,4 +33,10 @@ public function getConfig(): array
3333 'populate ' => true
3434 ];
3535 }
36+
37+ public function testHaveInDatabaseWithUppercaseTableName ()
38+ {
39+ $ testData = ['Status ' => 'test ' ];
40+ $ this ->module ->haveInDatabase ('NoPk ' , $ testData );
41+ }
3642}
You can’t perform that action at this time.
0 commit comments