]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix EFCore obsoletion warnings in Content.Server.Database (#26285)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Wed, 20 Mar 2024 14:47:36 +0000 (15:47 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Mar 2024 14:47:36 +0000 (15:47 +0100)
Content.Server.Database/SnakeCaseNaming.cs

index ca1a9665848aa72cf0694428b29439350cf51c08..27ce392cd50eab7f61a437ee3039217aa800460e 100644 (file)
@@ -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();