MythTV  master
Functions
dbcheckcommon.cpp File Reference
#include "mythconfig.h"
#include <cstdio>
#include <iostream>
#include <QString>
#include <QSqlError>
#include "mythdb.h"
#include "mythdbcheck.h"
#include "mythlogging.h"
Include dependency graph for dbcheckcommon.cpp:

Go to the source code of this file.

Functions

bool UpdateDBVersionNumber (const QString &component, const QString &versionkey, const QString &newnumber, QString &dbver)
 Updates the schema version stored in the database. More...
 
bool performUpdateSeries (const QString &component, const DBUpdates &updates)
 
bool performActualUpdate (const QString &component, const QString &versionkey, const DBUpdates &updates, const QString &version, QString &dbver)
 

Function Documentation

◆ UpdateDBVersionNumber()

UpdateDBVersionNumber ( const QString &  component,
const QString &  versionkey,
const QString &  newnumber,
QString &  dbver 
)

Updates the schema version stored in the database.

Updates "DBSchemaVer" property in the settings table.

Parameters
componentName of componenet being updated. Used for messages.
versionkeyThe name of the key for the schema version.
newnumberNew schema version.
dbverthe database version at the end of the function is returned in this parameter, if things go well this will be 'newnumber'.

Definition at line 28 of file dbcheckcommon.cpp.

Referenced by doUpgradeMusicDatabaseSchema(), doUpgradeTVDatabaseSchema(), doUpgradeVideoDatabaseSchema(), and performActualUpdate().

◆ performUpdateSeries()

bool performUpdateSeries ( const QString &  component,
const DBUpdates updates 
)

Definition at line 80 of file dbcheckcommon.cpp.

Referenced by doUpgradeTVDatabaseSchema(), and performActualUpdate().

◆ performActualUpdate()

bool performActualUpdate ( const QString &  component,
const QString &  versionkey,
const DBUpdates updates,
const QString &  version,
QString &  dbver 
)