We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d3933ca + a66d7f8 commit cf347c7Copy full SHA for cf347c7
src/Schema/Migrator.php
@@ -492,14 +492,13 @@ public function createForeignKey($relation): void
492
493
if (!$this->isIndexExists([$foreignField], true)) {
494
if ($foreignField->nullable && !$foreignField->required && $platform instanceof SQLServerPlatform) {
495
- // workaround https://github.com/doctrine/dbal/issues/5507
496
$foreignFieldForIndex = clone $foreignField;
497
$foreignFieldForIndex->nullable = false;
498
} else {
499
$foreignFieldForIndex = $foreignField;
500
}
501
502
- $this->createIndex([$foreignField], true);
+ $this->createIndex([$foreignFieldForIndex], true);
503
504
505
$foreignKey = new ForeignKeyConstraint(
0 commit comments