diff --git a/tests/lib/DB/OCPostgreSqlPlatformTest.php b/tests/lib/DB/OCPostgreSqlPlatformTest.php index 3ed420df501..73e7cb4ace0 100644 --- a/tests/lib/DB/OCPostgreSqlPlatformTest.php +++ b/tests/lib/DB/OCPostgreSqlPlatformTest.php @@ -1,4 +1,6 @@ createTableAndColumn($sourceSchema, Types::INTEGER); $this->createTableAndColumn($targetSchema, Types::BIGINT); - $comparator = new Comparator(); - $diff = $comparator->compare($sourceSchema, $targetSchema); - $sqlStatements = $diff->toSql($platform); + $comparator = new Comparator($platform); + $diff = $comparator->compareSchemas($sourceSchema, $targetSchema); + $sqlStatements = $platform->getAlterSchemaSQL($diff); $this->assertContains( 'ALTER TABLE poor_yorick ALTER id TYPE BIGINT', - $sqlStatements, - true + $sqlStatements ); $this->assertNotContains( 'ALTER TABLE poor_yorick ALTER id DROP DEFAULT', - $sqlStatements, - true + $sqlStatements ); } - protected function createTableAndColumn($schema, $type) { + protected function createTableAndColumn(Schema $schema, string $type): void { $table = $schema->createTable("poor_yorick"); $table->addColumn('id', $type, [ 'autoincrement' => true,