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 sphery <mtdean@…>, 18 years ago)

Adds the missing ClearSettingsCache?

  • libs/libmythtv/dbcheck.cpp

     
    1010#include "mythdbcon.h"
    1111
    1212/// This is the DB schema version expected by the running MythTV instance.
    13 const QString currentDatabaseVersion = "1187";
     13const QString currentDatabaseVersion = "1188";
    1414
    1515static bool UpdateDBVersionNumber(const QString &newnumber);
    1616static bool performActualUpdate(const QString updates[], QString version,
     
    30423042            return false;
    30433043    }
    30443044
     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//
    30453071//"ALTER TABLE cardinput DROP COLUMN preference;" in 0.22
    30463072//"ALTER TABLE channel DROP COLUMN atscsrcid;" in 0.22
    30473073//"ALTER TABLE recordedmarkup DROP COLUMN offset;" in 0.22