Ticket #3302: mythtv-DataDirect-no_update_min_max_hour-dbcheck.patch

File mythtv-DataDirect-no_update_min_max_hour-dbcheck.patch, 1.3 KB (added by sphery <mtdean@…>, 13 years ago)
  • 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            query.exec("UPDATE settings "
     3056                       "SET data = '-1' "
     3057                       "WHERE value = 'MythFillMinHour';");
     3058        }
     3059
     3060        if (!UpdateDBVersionNumber("1188"))
     3061            return false;
     3062
     3063        dbver = "1188";
     3064    }
     3065//
    30453066//"ALTER TABLE cardinput DROP COLUMN preference;" in 0.22
    30463067//"ALTER TABLE channel DROP COLUMN atscsrcid;" in 0.22
    30473068//"ALTER TABLE recordedmarkup DROP COLUMN offset;" in 0.22