5565dc3e05
- Add scripts and SQL for base and supplementary indexes (total 23) - Integrate index checks and auto-creation into Jellyfin startup - Update csproj to include SQL files in build/publish output - Add diagnostics, publish/copy scripts, and troubleshooting docs - Provide detailed guides for migration, verification, and merging - Ensures robust, automated, and well-documented index setup
2.3 KiB
2.3 KiB
🚀 Quick Reference: Publish Jellyfin with SQL Files
One Command Solution
.\publish-with-sql.ps1
That's it! Everything is handled automatically.
What Gets Published
publish/
├── jellyfin.exe
├── ... (all DLLs and files)
└── sql/ ← SQL files included!
├── all_performance_indexes.sql ← Main performance script
├── add_base_performance_indexes.sql
├── diagnostics.sql
└── schema_init/
└── 10_create_supplementary_indexes.sql
Verify After Publish
# Check if SQL files are present
Test-Path "Jellyfin.Server\bin\Release\net11.0\publish\sql\all_performance_indexes.sql"
# Returns: True ✅
# List all SQL files
ls "Jellyfin.Server\bin\Release\net11.0\publish\sql" -Recurse
Manual Method (If Needed)
# 1. Publish
dotnet publish Jellyfin.Server\Jellyfin.Server.csproj -c Release
# 2. Copy SQL files
.\copy-sql-files.ps1
What Happens on Startup
Jellyfin starts
↓
Checks if performance indexes exist
↓
Missing? → Loads sql/all_performance_indexes.sql
↓
Creates 23 performance indexes automatically
↓
✅ Database optimized!
Logs You'll See
[INF] Found 0/9 base performance indexes. Applying SQL script...
[INF] Executing performance indexes script: .../sql/all_performance_indexes.sql
[INF] Performance indexes created successfully. Database is now fully optimized.
Files Created for You
publish-with-sql.ps1- Automated publish + copy script ⭐copy-sql-files.ps1- Manual copy scriptJellyfin.Server/sql/- SQL files directory
Troubleshooting
SQL files not in publish output?
# Run the publish script
.\publish-with-sql.ps1
Already published without SQL files?
# Just copy them
.\copy-sql-files.ps1
Need to verify?
# Check the files
dir "Jellyfin.Server\bin\Release\net11.0\publish\sql"
Quick Test
# 1. Publish
.\publish-with-sql.ps1
# 2. Run
cd Jellyfin.Server\bin\Release\net11.0\publish
.\jellyfin.exe
# 3. Check logs - should see "Performance indexes created successfully"
That's all you need to know! 🎉
Use .\publish-with-sql.ps1 and you're done!