Fix EFCore obsoletion warnings in Content.Server.Database (#26285)
This commit is contained in:
committed by
GitHub
parent
205edfe6d7
commit
fc76996dc5
@@ -301,14 +301,14 @@ namespace Content.Server.Database
|
||||
private static void RewriteColumnName(IConventionPropertyBuilder propertyBuilder)
|
||||
{
|
||||
var property = propertyBuilder.Metadata;
|
||||
var entityType = property.DeclaringEntityType;
|
||||
var entityType = (IConventionEntityType)property.DeclaringType;
|
||||
|
||||
if (entityType.ClrType == typeof(Microsoft.EntityFrameworkCore.Migrations.HistoryRow))
|
||||
return;
|
||||
|
||||
property.Builder.HasNoAnnotation(RelationalAnnotationNames.ColumnName);
|
||||
|
||||
var baseColumnName = StoreObjectIdentifier.Create(property.DeclaringEntityType, StoreObjectType.Table) is { } tableIdentifier
|
||||
var baseColumnName = StoreObjectIdentifier.Create(entityType, StoreObjectType.Table) is { } tableIdentifier
|
||||
? property.GetDefaultColumnName(tableIdentifier)
|
||||
: property.GetDefaultColumnName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user