diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 3579fd48647..1b2e5c21550 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -3576,12 +3576,7 @@ public function getStringLiteralQuoteCharacter() return "'"; } - /** - * @param string $table - * - * @return string - */ - protected function getDropPrimaryKeySQL(string $table): string + protected function getDropPrimaryKeySQL(string $table) : string { return 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY'; } diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index 95b191f9084..54a3ebc60b0 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -752,10 +752,7 @@ public function getDropForeignKeySQL($foreignKey, $table) return $this->getDropConstraintSQL($foreignKey, $table); } - /** - * {@inheritDoc} - */ - protected function getDropPrimaryKeySQL(string $table): string + protected function getDropPrimaryKeySQL(string $table) : string { return $this->getDropConstraintSQL("{$table}_pkey", $table); } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php index 26503884fc4..a4ac8e6dd2c 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php @@ -509,7 +509,7 @@ public function autoIncrementTypeMigrations() : array public function testAlterTableChangePrimaryKey() : void { $tableFrom = new Table('primary_key_userid'); - $column = $tableFrom->addColumn('user_id', 'integer'); + $column = $tableFrom->addColumn('user_id', 'integer'); $column->setAutoincrement(true); $tableFrom->setPrimaryKey(['user_id']); $this->_sm->dropAndCreateTable($tableFrom); @@ -518,11 +518,11 @@ public function testAlterTableChangePrimaryKey() : void self::assertTrue($tableFrom->getColumn('user_id')->getAutoincrement()); $tableTo = new Table('primary_key_id'); - $column = $tableTo->addColumn('id', 'integer'); + $column = $tableTo->addColumn('id', 'integer'); $column->setAutoincrement(true); $tableTo->setPrimaryKey(['id']); - $c = new Comparator(); + $c = new Comparator(); $diff = $c->diffTable($tableFrom, $tableTo); self::assertInstanceOf(TableDiff::class, $diff, "There should be a difference and not false being returned from the table comparison");