Skip to content

Commit

Permalink
Don't uniquify non-existing FKs (#22066)
Browse files Browse the repository at this point in the history
Fixes #22064
  • Loading branch information
AndriySvyryd authored Aug 14, 2020
1 parent e6e1e4d commit ce45f9b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ private void TryUniquifyForeignKeyNames(
}

var foreignKeyName = foreignKey.GetConstraintName(storeObject, principalTable.Value);
if (foreignKeyName == null)
{
continue;
}

if (!foreignKeys.TryGetValue(foreignKeyName, out var otherForeignKey))
{
foreignKeys[foreignKeyName] = foreignKey;
Expand Down

0 comments on commit ce45f9b

Please sign in to comment.