aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-04-19 15:06:08 +0200
committerJoshua M. Boniface <joshua@boniface.me>2021-04-21 21:25:40 -0400
commit7db8601fbcf8ed2dcdddb8b6be4c987d2b6ff1fa (patch)
tree32496c6cde543989f194eddfdf0e40a388f01497 /Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
parent1ec247f5d8389cc446a059c65f088587c914de8e (diff)
Merge pull request #5863 from cvium/fix-index-migration
use IF NOT EXISTS in migration (cherry picked from commit 5a4cfe11cfe49ced786a60fa5edef96d3cef53a8) Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs')
-rw-r--r--Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs b/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
index 2521d9952..6343c422d 100644
--- a/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
+++ b/Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs
@@ -41,9 +41,9 @@ namespace Jellyfin.Server.Migrations.Routines
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 idx_TypedBaseItemsUserDataKeyType ON TypedBaseItems(UserDataKey, Type);");
+ connection.Execute("CREATE INDEX IF NOT EXISTS idx_TypedBaseItemsUserDataKeyType ON TypedBaseItems(UserDataKey, Type);");
_logger.LogInformation("Creating index idx_PeopleNameListOrder");
- connection.Execute("CREATE INDEX idx_PeopleNameListOrder ON People(Name, ListOrder);");
+ connection.Execute("CREATE INDEX IF NOT EXISTS idx_PeopleNameListOrder ON People(Name, ListOrder);");
}
}
-} \ No newline at end of file
+}