Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2193 Postgres GENERATED ALWAYS #2195

Merged
Prev Previous commit
Another Postgres version check.
  • Loading branch information
captain-redbeard committed May 13, 2023
commit e7dbe87fefe055ed9113bb9ab704104c83ae8aa1
9 changes: 9 additions & 0 deletions tests/Phinx/Db/Adapter/PostgresAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2297,6 +2297,15 @@ public function testDumpInsert()
INSERT INTO "public"."table1" ("string_col") OVERRIDING SYSTEM VALUE VALUES (null);
INSERT INTO "public"."table1" ("int_col") OVERRIDING SYSTEM VALUE VALUES (23);
OUTPUT;

if (!$this->usingPostgres10()) {
$expectedOutput = <<<'OUTPUT'
INSERT INTO "public"."table1" ("string_col") VALUES ('test data');
INSERT INTO "public"."table1" ("string_col") VALUES (null);
INSERT INTO "public"."table1" ("int_col") VALUES (23);
OUTPUT;
}

$actualOutput = $consoleOutput->fetch();
$this->assertStringContainsString(
$expectedOutput,
Expand Down