Add scripts for PostgreSQL migration and SQLite removal; update project references

- Introduced `publish-with-sql.ps1` to publish Jellyfin with SQL files.
- Added `remove-sqlite.ps1` to facilitate the removal of SQLite dependencies for PostgreSQL-only deployment.
- Created `rollback-to-net10.ps1` to revert .NET 11 changes back to .NET 10.
- Implemented `test_api.py` for testing API interactions.
- Added `verify-migration.ps1` to verify PostgreSQL migration steps.
- Updated various `.csproj` files to include `Microsoft.Kiota.Abstractions` package.
- Enhanced `JellyfinDbContext` to handle concurrency exceptions during save operations.
- Updated tests to include new package references and ensure compatibility with changes.
This commit is contained in:
2026-07-07 10:59:40 -04:00
parent bf51bff748
commit 9bcb8501ab
70 changed files with 1370 additions and 13 deletions
+54
View File
@@ -0,0 +1,54 @@
# publish-with-sql.ps1
# Publishes Jellyfin and ensures SQL files are included
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Publishing Jellyfin with SQL files" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Step 1: Publishing Jellyfin..." -ForegroundColor Yellow
dotnet publish Jellyfin.Server\Jellyfin.Server.csproj -c Release -o Jellyfin.Server\bin\Release\net11.0\publish
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Publish failed" -ForegroundColor Red
exit 1
}
Write-Host "✓ Publish successful" -ForegroundColor Green
Write-Host ""
Write-Host "Step 2: Copying SQL files..." -ForegroundColor Yellow
$publishDir = "Jellyfin.Server\bin\Release\net11.0\publish"
# Create sql directory structure
New-Item -ItemType Directory -Path "$publishDir\sql" -Force | Out-Null
New-Item -ItemType Directory -Path "$publishDir\sql\schema_init" -Force | Out-Null
# Copy SQL files
try {
Copy-Item "Jellyfin.Server\sql\*.sql" "$publishDir\sql\" -Force -ErrorAction Stop
$mainFileCount = (Get-ChildItem "$publishDir\sql\*.sql").Count
Write-Host " ✓ Copied $mainFileCount main SQL files" -ForegroundColor Green
Copy-Item "Jellyfin.Server\sql\schema_init\*.sql" "$publishDir\sql\schema_init\" -Force -ErrorAction SilentlyContinue
$initFileCount = (Get-ChildItem "$publishDir\sql\schema_init\*.sql" -ErrorAction SilentlyContinue).Count
Write-Host " ✓ Copied $initFileCount schema_init SQL files" -ForegroundColor Green
} catch {
Write-Host "❌ Failed to copy SQL files: $_" -ForegroundColor Red
exit 1
}
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "✓ Publish Complete!" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Output directory: $publishDir" -ForegroundColor Yellow
Write-Host ""
Write-Host "SQL files:" -ForegroundColor Yellow
Get-ChildItem "$publishDir\sql" -Recurse -File | ForEach-Object {
Write-Host " - $($_.FullName.Replace($PWD.Path + '\', ''))" -ForegroundColor Gray
}
Write-Host ""
Write-Host "Next: Run jellyfin.exe from the publish directory" -ForegroundColor Cyan