mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Merge pull request #5863 from cvium/fix-index-migration
use IF NOT EXISTS in migration
(cherry picked from commit 5a4cfe11cf)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
1ec247f5d8
commit
7db8601fbc
1 changed files with 3 additions and 3 deletions
|
|
@ -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);");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue