aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2023-01-14 14:19:53 -0700
committerGitHub <noreply@github.com>2023-01-14 14:19:53 -0700
commitbe206d4ff2d799296764c005d7bbbdb5cff7ee2c (patch)
tree4a3f393a8c4aaeac2921a662f681a6f401075f1b /Jellyfin.Server
parent56ef45ebf004cd444066335084111781b983e853 (diff)
parent8ff0cb1e9dc0ac53ed099e58efa5366c377e393a (diff)
Merge pull request #9044 from Bond-009/db
Diffstat (limited to 'Jellyfin.Server')
-rw-r--r--Jellyfin.Server/Migrations/MigrationRunner.cs1
-rw-r--r--Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs49
-rw-r--r--Jellyfin.Server/Program.cs4
3 files changed, 0 insertions, 54 deletions
diff --git a/Jellyfin.Server/Migrations/MigrationRunner.cs b/Jellyfin.Server/Migrations/MigrationRunner.cs
index e9a45c140..23fb9e370 100644
--- a/Jellyfin.Server/Migrations/MigrationRunner.cs
+++ b/Jellyfin.Server/Migrations/MigrationRunner.cs
@@ -38,7 +38,6 @@ namespace Jellyfin.Server.Migrations
typeof(Routines.ReaddDefaultPluginRepository),
typeof(Routines.MigrateDisplayPreferencesDb),
typeof(Routines.RemoveDownloadImagesInAdvance),
- typeof(Routines.AddPeopleQueryIndex),
typeof(Routines.MigrateAuthenticationDb)
};
diff --git a/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs b/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
deleted file mode 100644
index 6343c422d..000000000
--- a/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System;
-using System.IO;
-using MediaBrowser.Controller;
-using Microsoft.Extensions.Logging;
-using SQLitePCL.pretty;
-
-namespace Jellyfin.Server.Migrations.Routines
-{
- /// <summary>
- /// Migration to add table indexes to optimize the Persons query.
- /// </summary>
- public class AddPeopleQueryIndex : IMigrationRoutine
- {
- private const string DbFilename = "library.db";
- private readonly ILogger<AddPeopleQueryIndex> _logger;
- private readonly IServerApplicationPaths _serverApplicationPaths;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AddPeopleQueryIndex"/> class.
- /// </summary>
- /// <param name="logger">Instance of the <see cref="ILogger{AddPeopleQueryIndex}"/> interface.</param>
- /// <param name="serverApplicationPaths">Instance of the <see cref="IServerApplicationPaths"/> interface.</param>
- public AddPeopleQueryIndex(ILogger<AddPeopleQueryIndex> logger, IServerApplicationPaths serverApplicationPaths)
- {
- _logger = logger;
- _serverApplicationPaths = serverApplicationPaths;
- }
-
- /// <inheritdoc />
- public Guid Id => new Guid("DE009B59-BAAE-428D-A810-F67762DC05B8");
-
- /// <inheritdoc />
- public string Name => "AddPeopleQueryIndex";
-
- /// <inheritdoc />
- public bool PerformOnNewInstall => true;
-
- /// <inheritdoc />
- public void Perform()
- {
- var databasePath = Path.Join(_serverApplicationPaths.DataPath, DbFilename);
- using var connection = SQLite3.Open(databasePath, ConnectionFlags.ReadWrite, null);
- _logger.LogInformation("Creating index idx_TypedBaseItemsUserDataKeyType");
- connection.Execute("CREATE INDEX IF NOT EXISTS idx_TypedBaseItemsUserDataKeyType ON TypedBaseItems(UserDataKey, Type);");
- _logger.LogInformation("Creating index idx_PeopleNameListOrder");
- connection.Execute("CREATE INDEX IF NOT EXISTS idx_PeopleNameListOrder ON People(Name, ListOrder);");
- }
- }
-}
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 1506530f0..540375dce 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -273,10 +273,6 @@ namespace Jellyfin.Server
ServicePointManager.Expect100Continue = false;
Batteries_V2.Init();
- if (raw.sqlite3_enable_shared_cache(1) != raw.SQLITE_OK)
- {
- _logger.LogWarning("Failed to enable shared cache for SQLite");
- }
}
/// <summary>