Skip to content

Commit

Permalink
database/schemamanager: Revert functional change from mixxxdj#2925
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Aug 16, 2020
1 parent 57abee5 commit a0e1228
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/database/schemamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a0e1228

Please sign in to comment.