diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-04-19 15:06:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-19 15:06:08 +0200 |
| commit | 5a4cfe11cfe49ced786a60fa5edef96d3cef53a8 (patch) | |
| tree | 9870bbc45bbc0239ca604ff003698b268bed58c9 | |
| parent | 4eeb69233d62d8ea8774acc440c43bef8a5a56fe (diff) | |
| parent | 586e1fc58a52d343714958af713d102300ccfde0 (diff) | |
Merge pull request #5863 from cvium/fix-index-migration
use IF NOT EXISTS in migration
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/AddPeopleQueryIndex.cs | 6 |
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 +} |
