Log failure to update DATABASE_VERSION

Change-Id: I7fc844acda3892cea68c1e9a44a89e87c997f789
This commit is contained in:
Oliver Scott
2022-02-15 20:58:06 +01:00
committed by Bruno Martins
parent 86420ad226
commit ca136deee2

View File

@@ -409,6 +409,13 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{
upgradeVersion = 15;
}
// *** Remember to update DATABASE_VERSION above!
if (upgradeVersion != newVersion) {
Log.wtf(TAG, "warning: upgrading settings database to version "
+ newVersion + " left it at "
+ upgradeVersion +
" instead; this is probably a bug. Did you update DATABASE_VERSION?",
new RuntimeException("db upgrade error"));
}
}
private void moveSettingsToNewTable(SQLiteDatabase db,