diff options
author | ksooo <3226626+ksooo@users.noreply.github.com> | 2022-12-11 17:49:38 +0100 |
---|---|---|
committer | ksooo <3226626+ksooo@users.noreply.github.com> | 2022-12-11 22:22:50 +0100 |
commit | 6acf7511c337b7b446b60f6ed5c3939e2f87545d (patch) | |
tree | 81faf8d15e66508168368d5647f597b0ef042982 | |
parent | 911ad268d07049f6dc08fd2bbd7feae60c6fb6e8 (diff) |
[PVR] Fix EPG database v15 -> v16 migration.
-rw-r--r-- | xbmc/pvr/epg/EpgDatabase.cpp | 79 |
1 files changed, 47 insertions, 32 deletions
diff --git a/xbmc/pvr/epg/EpgDatabase.cpp b/xbmc/pvr/epg/EpgDatabase.cpp index 8824daf2b4..191f5958b5 100644 --- a/xbmc/pvr/epg/EpgDatabase.cpp +++ b/xbmc/pvr/epg/EpgDatabase.cpp @@ -27,36 +27,6 @@ using namespace dbiplus; using namespace PVR; -namespace -{ -// clang-format off -const std::string sqlCreateSavedSearchesTable = "CREATE TABLE savedsearches (" - "idSearch integer primary key," - "sTitle varchar(255), " - "sLastExecutedDateTime varchar(20), " - "sSearchTerm varchar(255), " - "bSearchInDescription bool, " - "iGenreType integer, " - "sStartDateTime varchar(20), " - "sEndDateTime varchar(20), " - "bIsCaseSensitive bool, " - "iMinimumDuration integer, " - "iMaximumDuration integer, " - "bIsRadio bool, " - "iClientId integer, " - "iChannelUid integer, " - "bIncludeUnknownGenres bool, " - "bRemoveDuplicates bool, " - "bIgnoreFinishedBroadcasts bool, " - "bIgnoreFutureBroadcasts bool, " - "bFreeToAirOnly bool, " - "bIgnorePresentTimers bool, " - "bIgnorePresentRecordings bool," - "iChannelGroup integer" - ")"; -// clang-format on -} // unnamed namespace - bool CPVREpgDatabase::Open() { std::unique_lock<CCriticalSection> lock(m_critSection); @@ -137,7 +107,30 @@ void CPVREpgDatabase::CreateTables() ); CLog::LogFC(LOGDEBUG, LOGEPG, "Creating table 'savedsearches'"); - m_pDS->exec(sqlCreateSavedSearchesTable); + m_pDS->exec("CREATE TABLE savedsearches (" + "idSearch integer primary key," + "sTitle varchar(255), " + "sLastExecutedDateTime varchar(20), " + "sSearchTerm varchar(255), " + "bSearchInDescription bool, " + "iGenreType integer, " + "sStartDateTime varchar(20), " + "sEndDateTime varchar(20), " + "bIsCaseSensitive bool, " + "iMinimumDuration integer, " + "iMaximumDuration integer, " + "bIsRadio bool, " + "iClientId integer, " + "iChannelUid integer, " + "bIncludeUnknownGenres bool, " + "bRemoveDuplicates bool, " + "bIgnoreFinishedBroadcasts bool, " + "bIgnoreFutureBroadcasts bool, " + "bFreeToAirOnly bool, " + "bIgnorePresentTimers bool, " + "bIgnorePresentRecordings bool," + "iChannelGroup integer" + ")"); } void CPVREpgDatabase::CreateAnalytics() @@ -301,7 +294,29 @@ void CPVREpgDatabase::UpdateTables(int iVersion) if (iVersion < 15) { - m_pDS->exec(sqlCreateSavedSearchesTable); + m_pDS->exec("CREATE TABLE savedsearches (" + "idSearch integer primary key," + "sTitle varchar(255), " + "sLastExecutedDateTime varchar(20), " + "sSearchTerm varchar(255), " + "bSearchInDescription bool, " + "iGenreType integer, " + "sStartDateTime varchar(20), " + "sEndDateTime varchar(20), " + "bIsCaseSensitive bool, " + "iMinimumDuration integer, " + "iMaximumDuration integer, " + "bIsRadio bool, " + "iClientId integer, " + "iChannelUid integer, " + "bIncludeUnknownGenres bool, " + "bRemoveDuplicates bool, " + "bIgnoreFinishedBroadcasts bool, " + "bIgnoreFutureBroadcasts bool, " + "bFreeToAirOnly bool, " + "bIgnorePresentTimers bool, " + "bIgnorePresentRecordings bool" + ")"); } if (iVersion < 16) |