Revert "Set expiry to NULL where it was 0L, hopefully fixing migration issues"
This reverts commit c8f730ced8.
This commit is contained in:
@@ -51,7 +51,7 @@ import timber.log.Timber;
|
|||||||
*/
|
*/
|
||||||
public class KeychainDatabase {
|
public class KeychainDatabase {
|
||||||
private static final String DATABASE_NAME = "openkeychain.db";
|
private static final String DATABASE_NAME = "openkeychain.db";
|
||||||
private static final int DATABASE_VERSION = 31;
|
private static final int DATABASE_VERSION = 30;
|
||||||
private final SupportSQLiteOpenHelper supportSQLiteOpenHelper;
|
private final SupportSQLiteOpenHelper supportSQLiteOpenHelper;
|
||||||
|
|
||||||
private static KeychainDatabase sInstance;
|
private static KeychainDatabase sInstance;
|
||||||
@@ -363,16 +363,9 @@ public class KeychainDatabase {
|
|||||||
|
|
||||||
case 29:
|
case 29:
|
||||||
recreateUnifiedKeyView(db);
|
recreateUnifiedKeyView(db);
|
||||||
|
|
||||||
case 30:
|
|
||||||
fixKeyExpiries(db);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fixKeyExpiries(SupportSQLiteDatabase db) {
|
|
||||||
db.execSQL("UPDATE keys SET expiry = NULL WHERE expiry = 0;");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void recreateUnifiedKeyView(SupportSQLiteDatabase db) {
|
private void recreateUnifiedKeyView(SupportSQLiteDatabase db) {
|
||||||
try {
|
try {
|
||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
|
|||||||
Reference in New Issue
Block a user