diff --git a/tests/Phinx/Db/Adapter/PostgresAdapterTest.php b/tests/Phinx/Db/Adapter/PostgresAdapterTest.php index 65a8e3b6c..5c5f698b6 100644 --- a/tests/Phinx/Db/Adapter/PostgresAdapterTest.php +++ b/tests/Phinx/Db/Adapter/PostgresAdapterTest.php @@ -2462,12 +2462,12 @@ public function testDumpCreateTable() ->save(); if ($this->usingPostgres10()) { - $expectedOutput = 'CREATE TABLE "public"."table1" ("id" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, "column1" CHARACTER VARYING (255) ' . - 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING (255) NOT NULL DEFAULT \'test\', CONSTRAINT ' . + $expectedOutput = 'CREATE TABLE "public"."table1" ("id" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, "column1" CHARACTER VARYING ' . + 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING NOT NULL DEFAULT \'test\', CONSTRAINT ' . '"table1_pkey" PRIMARY KEY ("id"));'; } else { - $expectedOutput = 'CREATE TABLE "public"."table1" ("id" SERIAL NOT NULL, "column1" CHARACTER VARYING (255) ' . - 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING (255) NOT NULL DEFAULT \'test\', CONSTRAINT ' . + $expectedOutput = 'CREATE TABLE "public"."table1" ("id" SERIAL NOT NULL, "column1" CHARACTER VARYING ' . + 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING NOT NULL DEFAULT \'test\', CONSTRAINT ' . '"table1_pkey" PRIMARY KEY ("id"));'; } $actualOutput = $consoleOutput->fetch(); @@ -2494,12 +2494,12 @@ public function testDumpCreateTableWithSchema() ->save(); if ($this->usingPostgres10()) { - $expectedOutput = 'CREATE TABLE "schema1"."table1" ("id" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, "column1" CHARACTER VARYING (255) ' . - 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING (255) NOT NULL DEFAULT \'test\', CONSTRAINT ' . + $expectedOutput = 'CREATE TABLE "schema1"."table1" ("id" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, "column1" CHARACTER VARYING ' . + 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING NOT NULL DEFAULT \'test\', CONSTRAINT ' . '"table1_pkey" PRIMARY KEY ("id"));'; } else { - $expectedOutput = 'CREATE TABLE "schema1"."table1" ("id" SERIAL NOT NULL, "column1" CHARACTER VARYING (255) ' . - 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING (255) NOT NULL DEFAULT \'test\', CONSTRAINT ' . + $expectedOutput = 'CREATE TABLE "schema1"."table1" ("id" SERIAL NOT NULL, "column1" CHARACTER VARYING ' . + 'NULL, "column2" INTEGER NULL, "column3" CHARACTER VARYING NOT NULL DEFAULT \'test\', CONSTRAINT ' . '"table1_pkey" PRIMARY KEY ("id"));'; } $actualOutput = $consoleOutput->fetch(); @@ -2639,13 +2639,13 @@ public function testDumpCreateTableAndThenInsert() ])->save(); $expectedOutput = <<<'OUTPUT' -CREATE TABLE "schema1"."table1" ("column1" CHARACTER VARYING (255) NOT NULL, "column2" INTEGER NULL, CONSTRAINT "table1_pkey" PRIMARY KEY ("column1")); +CREATE TABLE "schema1"."table1" ("column1" CHARACTER VARYING NOT NULL, "column2" INTEGER NULL, CONSTRAINT "table1_pkey" PRIMARY KEY ("column1")); INSERT INTO "schema1"."table1" ("column1", "column2") OVERRIDING SYSTEM VALUE VALUES ('id1', 1); OUTPUT; if (!$this->usingPostgres10()) { $expectedOutput = <<<'OUTPUT' -CREATE TABLE "schema1"."table1" ("column1" CHARACTER VARYING (255) NOT NULL, "column2" INTEGER NULL, CONSTRAINT "table1_pkey" PRIMARY KEY ("column1")); +CREATE TABLE "schema1"."table1" ("column1" CHARACTER VARYING NOT NULL, "column2" INTEGER NULL, CONSTRAINT "table1_pkey" PRIMARY KEY ("column1")); INSERT INTO "schema1"."table1" ("column1", "column2") VALUES ('id1', 1); OUTPUT; }