Ticket #5286: mythtv-5286-use_IsNewDatabase_everywhere-20080703.patch

File mythtv-5286-use_IsNewDatabase_everywhere-20080703.patch, 1.0 KB (added by sphery <mtdean@…>, 12 years ago)

de-fuzzed patch after recent library changes

  • libs/libmythtv/dbcheck.cpp

     
    614614        return true;
    615615    }
    616616
    617     if (dbver == "")
     617    if (DBUtil::IsNewDatabase())
    618618    {
    619619        if (!InitializeDatabase())
    620620            return false;
  • libs/libmyth/mythcontext.cpp

     
    2929#include "util-x11.h"
    3030#include "mythsocket.h"
    3131#include "themeinfo.h"
     32#include "dbutil.h"
    3233
    3334#include "libmythdb/mythdb.h"
    3435#include "libmythdb/mythdirs.h"
     
    19751976
    19761977
    19771978    // No current DBSchemaVer? Empty database, so upgrade to create tables
    1978     if (dbver.isEmpty() || dbver == "0")
     1979    if (DBUtil::IsNewDatabase())
    19791980    {
    19801981        VERBOSE(VB_GENERAL, "No current database version. Auto upgrading");
    19811982        return MYTH_SCHEMA_UPGRADE;