Disable EF Core migrations for .NET 11 preview - use manual SQL scripts instead

This commit is contained in:
2026-03-07 12:52:05 -05:00
parent 5202d72999
commit 091114657b
7 changed files with 1891 additions and 2 deletions
@@ -3,7 +3,7 @@
"operationId": "02bc6448-a69d-4ff4-a0ec-0db07ec3a09a",
"description": "Upgrade solution or project to new version of .NET",
"startTime": "2026-03-05T22:18:32.3921759Z",
"lastUpdateTime": "2026-03-07T16:26:16.8032461Z",
"lastUpdateTime": "2026-03-07T17:48:10.3399967Z",
"stage": "Execution",
"properties": {},
"folderPath": ""
+1 -1
View File
@@ -51,7 +51,7 @@
<PackageVersion Include="Microsoft.Extensions.Options" Version="11.0.0-preview.1.26104.118" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="MimeTypes" Version="2.5.2" />
<PackageVersion Include="Morestachio" Version="5.0.1.631" />
<PackageVersion Include="Morestachio" Version="5.0.1.670" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="NEbml" Version="1.1.0.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
+5
View File
@@ -39,6 +39,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SerilogAnalyzer" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" PrivateAssets="All" />
File diff suppressed because it is too large Load Diff
@@ -395,6 +395,13 @@ public sealed class PostgresDatabaseProvider : IJellyfinDatabaseProvider
if (pendingMigrationsList.Count > 0)
{
logger.LogInformation("Found {Count} pending migrations: {Migrations}", pendingMigrationsList.Count, string.Join(", ", pendingMigrationsList));
// DISABLED: EF Core migrations don't work with .NET 11 preview
// Use manual SQL scripts in Jellyfin.Server/sql/schema_init/ directory instead
logger.LogWarning("EF Core migrations are disabled for .NET 11 preview. Please apply migrations manually using SQL scripts in sql/schema_init/ directory.");
logger.LogWarning("Run the following script: apply-supplementary-indexes-migration.sql");
/* COMMENTED OUT - EF migrations not compatible with .NET 11 preview
logger.LogInformation("Applying migrations...");
try
@@ -428,6 +435,7 @@ public sealed class PostgresDatabaseProvider : IJellyfinDatabaseProvider
logger.LogWarning("If you're seeing this on a test/production system, ensure all migration files are deployed.");
throw;
}
*/
}
else
{