diff --git a/EFCore.NamingConventions/Internal/NameRewritingConvention.cs b/EFCore.NamingConventions/Internal/NameRewritingConvention.cs index b4999a2..2a06f05 100644 --- a/EFCore.NamingConventions/Internal/NameRewritingConvention.cs +++ b/EFCore.NamingConventions/Internal/NameRewritingConvention.cs @@ -303,7 +303,7 @@ private void RewriteColumnName(IConventionPropertyBuilder propertyBuilder) // Remove any previous setting of the column name we may have done, so we can get the default recalculated below. property.Builder.HasNoAnnotation(RelationalAnnotationNames.ColumnName); - if (_ignoreMigrationTable && entityType.ClrType.FullName == "Microsoft.EntityFrameworkCore.Migrations.HistoryRow") + if (_ignoreMigrationTable && property.DeclaringType.ClrType.FullName == "Microsoft.EntityFrameworkCore.Migrations.HistoryRow") { return; }