[core] Remove database on schema downgrade

Previously we were throwing an exception.
This commit is contained in:
Thiago Marcos P. Santos
2017-08-21 17:58:27 +03:00
committed by Jason Wray
parent e78620c705
commit 9c4071fe86

View File

@@ -50,7 +50,7 @@ void OfflineDatabase::ensureSchema() {
case 3: // no-op and fall through
case 4: migrateToVersion5(); // fall through
case 5: return;
default: throw std::runtime_error("unknown schema version");
default: break; // downgrade, delete the database
}
removeExisting();