diff --git a/src/EFCore.Relational/Metadata/IReadOnlyCheckConstraint.cs b/src/EFCore.Relational/Metadata/IReadOnlyCheckConstraint.cs index 15ba2fc8a37..5de8906d38d 100644 --- a/src/EFCore.Relational/Metadata/IReadOnlyCheckConstraint.cs +++ b/src/EFCore.Relational/Metadata/IReadOnlyCheckConstraint.cs @@ -44,15 +44,7 @@ public interface IReadOnlyCheckConstraint : IReadOnlyAnnotatable /// The identifier of the store object. /// The default name that would be used for this check constraint. 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()); /// /// Gets the entity type on which this check constraint is defined.