Ticket #5286: mythtv-5286-use_IsNewDatabase_everywhere.patch

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

replaces "new database" DBSchemaVer checks with DBUtil::IsNewDatabase?()

  • 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

     
    3030#include "util-x11.h"
    3131#include "mythsocket.h"
    3232#include "themeinfo.h"
     33#include "dbutil.h"
    3334
    3435#include "libmythui/mythmainwindow.h"
    3536#include "libmythupnp/mythxmlclient.h"
     
    35463547
    35473548
    35483549    // No current DBSchemaVer? Empty database, so upgrade to create tables
    3549     if (dbver.isEmpty() || dbver == "0")
     3550    if (DBUtil::IsNewDatabase())
    35503551    {
    35513552        VERBOSE(VB_GENERAL, "No current database version. Auto upgrading");
    35523553        return MYTH_SCHEMA_UPGRADE;