[core] Remove database on schema downgrade
Previously we were throwing an exception.
This commit is contained in:
committed by
Jason Wray
parent
e78620c705
commit
9c4071fe86
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user