diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index ba63e6964d5..423ed3b5320 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -709,11 +709,6 @@ private function gatherRelationJoinColumns( } $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); - - if (! $this->platform->supportsForeignKeyConstraints()) { - return; - } - if (isset($addedFks[$compositeName]) && ($foreignTableName != $addedFks[$compositeName]['foreignTableName'] || 0 < count(array_diff($foreignColumns, $addedFks[$compositeName]['foreignColumns']))) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2138Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2138Test.php index c6019f849c5..960395e9c70 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2138Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2138Test.php @@ -14,9 +14,6 @@ class DDC2138Test extends OrmFunctionalTestCase public function testForeignKeyOnSTIWithMultipleMapping() { $em = $this->_em; - if (! $em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { - $this->markTestSkipped('Platform does not support foreign keys.'); - } $schemaTool = new SchemaTool($em); $classes = [ diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7841Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7841Test.php deleted file mode 100644 index 4e6f46324ca..00000000000 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7841Test.php +++ /dev/null @@ -1,57 +0,0 @@ -_em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { - $this->markTestSkipped('Test for platforms without foreign keys support'); - } - $class = $this->_em->getClassMetadata(GH7841Child::class); - $this->_schemaTool->updateSchema([$class], true); - $diff = $this->_schemaTool->getUpdateSchemaSql([$class], true); - - self::assertEmpty($diff); - - $this->_schemaTool->dropSchema([$class]); - } -} - -/** - * @Entity - */ -class GH7841Parent -{ - /** @Id @Column(type="integer") @GeneratedValue */ - public $id; - - /** @OneToMany(targetEntity=GH7841Child::class, mappedBy="parent") */ - public $children; - - public function __construct() - { - $this->children = new ArrayCollection(); - } -} - -/** - * @Entity - */ -class GH7841Child -{ - /** @Id @Column(type="integer") @GeneratedValue */ - public $id; - - /** @ManyToOne(targetEntity=GH7841Parent::class) */ - public $parent; -}