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)
|
private static void RewriteColumnName(IConventionPropertyBuilder propertyBuilder)
|
||||||
{
|
{
|
||||||
var property = propertyBuilder.Metadata;
|
var property = propertyBuilder.Metadata;
|
||||||
var entityType = property.DeclaringEntityType;
|
var entityType = (IConventionEntityType)property.DeclaringType;
|
||||||
|
|
||||||
if (entityType.ClrType == typeof(Microsoft.EntityFrameworkCore.Migrations.HistoryRow))
|
if (entityType.ClrType == typeof(Microsoft.EntityFrameworkCore.Migrations.HistoryRow))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
property.Builder.HasNoAnnotation(RelationalAnnotationNames.ColumnName);
|
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(tableIdentifier)
|
||||||
: property.GetDefaultColumnName();
|
: property.GetDefaultColumnName();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user