From a0e1228b96799b463c408c6d5c1fbc6d14457d06 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sun, 16 Aug 2020 12:55:40 +0200 Subject: [PATCH] database/schemamanager: Revert functional change from #2925 --- src/database/schemamanager.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/database/schemamanager.cpp b/src/database/schemamanager.cpp index 6cfc2ab33a1..f2a3085b686 100644 --- a/src/database/schemamanager.cpp +++ b/src/database/schemamanager.cpp @@ -43,8 +43,19 @@ bool SchemaManager::isBackwardsCompatibleWithVersion(int targetVersion) const { bool ok = false; int iBackwardsCompatibleVersion = backwardsCompatibleVersion.toInt(&ok); + // If the current backwards compatible schema version is not stored in the + // settings table, assume the current schema version is only backwards + // compatible with itself. if (backwardsCompatibleVersion.isNull() || !ok) { - iBackwardsCompatibleVersion = m_currentVersion; + if (m_currentVersion == 7) { + // We only added the backwards compatible flags in November 2010, + // and some people using the Mixxx trunk are already on schema + // version 7 by then. This special case is for them. Schema version + // 7 is backwards compatible with schema version 3. + iBackwardsCompatibleVersion = 3; + } else { + iBackwardsCompatibleVersion = m_currentVersion; + } } return iBackwardsCompatibleVersion <= targetVersion;