Skip to content

Commit

Permalink
Remove quirk for #27059
Browse files Browse the repository at this point in the history
  • Loading branch information
ajcvickers committed Jan 10, 2022
1 parent 5761fce commit 5684caa
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/EFCore.Relational/Metadata/IReadOnlyCheckConstraint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ public interface IReadOnlyCheckConstraint : IReadOnlyAnnotatable
/// <param name="storeObject">The identifier of the store object.</param>
/// <returns>The default name that would be used for this check constraint.</returns>
string GetDefaultName(in StoreObjectIdentifier storeObject)
{
var prefix = $"CK_{storeObject.Name}_";
return Uniquifier.Truncate(
!(AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue27059", out var enabled) && enabled)
|| ModelName.StartsWith(prefix, StringComparison.Ordinal)
? ModelName
: prefix + ModelName,
EntityType.Model.GetMaxIdentifierLength());
}
=> Uniquifier.Truncate(ModelName, EntityType.Model.GetMaxIdentifierLength());

/// <summary>
/// Gets the entity type on which this check constraint is defined.
Expand Down

0 comments on commit 5684caa

Please sign in to comment.