UI: ConfManager: Minor refactor

This commit is contained in:
Nodir Temirkhodjaev 2023-08-17 10:58:11 +05:00
parent a59077a950
commit d824118bbc
3 changed files with 15 additions and 9 deletions

View File

@ -314,11 +314,13 @@ bool migrateFunc(SqliteDb *db, int version, bool isNewDb, void *ctx)
{
Q_UNUSED(ctx);
if (isNewDb)
if (isNewDb) {
// COMPAT: DB schema
return true;
}
// COMPAT
if (version <= 21) {
// COMPAT: DB content
if (version < 21) {
migrateAppPaths(db);
}

View File

@ -26,11 +26,13 @@ bool migrateFunc(SqliteDb *db, int version, bool isNewDb, void *ctx)
{
Q_UNUSED(ctx);
if (isNewDb)
if (isNewDb) {
// COMPAT: DB schema
return true;
}
// COMPAT
if (version <= 7) {
// COMPAT: DB content
if (version < 7) {
const QString srcSchema = SqliteDb::migrationOldSchemaName();
const QString dstSchema = SqliteDb::migrationNewSchemaName();

View File

@ -31,11 +31,13 @@ bool migrateFunc(SqliteDb *db, int version, bool isNewDb, void *ctx)
{
Q_UNUSED(ctx);
if (isNewDb)
if (isNewDb) {
// COMPAT: DB schema
return true;
}
// COMPAT
if (version <= 3) {
// COMPAT: DB content
if (version < 3) {
// Move apps' total traffic to separate table
const QString srcSchema = SqliteDb::migrationOldSchemaName();
const QString dstSchema = SqliteDb::migrationNewSchemaName();