mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-14 07:08:00 -05:00
Check database version after ending the transaction
This commit is contained in:
parent
d08169b004
commit
83e57064ff
@ -379,15 +379,15 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
|
|
||||||
db.setVersion(DB_VERSION);
|
db.setVersion(DB_VERSION);
|
||||||
|
|
||||||
if (db.getVersion() != DB_VERSION) {
|
|
||||||
throw new Error("Database upgrade failed!");
|
|
||||||
}
|
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (db.getVersion() != DB_VERSION) {
|
||||||
|
throw new Error("Database upgrade failed!");
|
||||||
|
}
|
||||||
|
|
||||||
// Unless we're blowing away the whole data store, there's no reason to prune attachments
|
// Unless we're blowing away the whole data store, there's no reason to prune attachments
|
||||||
// every time the user upgrades. it'll just cost them money and pain.
|
// every time the user upgrades. it'll just cost them money and pain.
|
||||||
// try
|
// try
|
||||||
|
Loading…
Reference in New Issue
Block a user