Ticket #3302: mythtv-DataDirect-no_update_min_max_hour-dbcheck-20070413.patch
File mythtv-DataDirect-no_update_min_max_hour-dbcheck-20070413.patch, 1.5 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/dbcheck.cpp
10 10 #include "mythdbcon.h" 11 11 12 12 /// This is the DB schema version expected by the running MythTV instance. 13 const QString currentDatabaseVersion = "118 7";13 const QString currentDatabaseVersion = "1188"; 14 14 15 15 static bool UpdateDBVersionNumber(const QString &newnumber); 16 16 static bool performActualUpdate(const QString updates[], QString version, … … 3042 3042 return false; 3043 3043 } 3044 3044 3045 if (dbver == "1187") 3046 { 3047 VERBOSE(VB_IMPORTANT, "Upgrading to schema version 1188"); 3048 3049 int suggests = gContext->GetNumSetting("MythFillGrabberSuggestsTime", 3050 0); 3051 if (suggests) 3052 { 3053 MSqlQuery query(MSqlQuery::InitCon()); 3054 3055 QString key = "MythFillMinHour"; 3056 QString newValue = "-1"; 3057 3058 query.exec(QString("UPDATE settings " 3059 "SET data = %1 " 3060 "WHERE value = %2;").arg(newValue).arg(key)); 3061 3062 gContext->ClearSettingsCache(key, newValue); 3063 } 3064 3065 if (!UpdateDBVersionNumber("1188")) 3066 return false; 3067 3068 dbver = "1188"; 3069 } 3070 // 3045 3071 //"ALTER TABLE cardinput DROP COLUMN preference;" in 0.22 3046 3072 //"ALTER TABLE channel DROP COLUMN atscsrcid;" in 0.22 3047 3073 //"ALTER TABLE recordedmarkup DROP COLUMN offset;" in 0.22