|
|
|
@ -70,9 +70,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|
|
|
|
private static final int lokiV33 = 54;
|
|
|
|
|
private static final int lokiV34 = 55;
|
|
|
|
|
private static final int lokiV35 = 56;
|
|
|
|
|
private static final int lokiV36 = 57;
|
|
|
|
|
|
|
|
|
|
// Loki - onUpgrade(...) must be updated to use Loki version numbers if Signal makes any database changes
|
|
|
|
|
private static final int DATABASE_VERSION = lokiV35;
|
|
|
|
|
private static final int DATABASE_VERSION = lokiV36;
|
|
|
|
|
private static final String DATABASE_NAME = "signal.db";
|
|
|
|
|
|
|
|
|
|
private final Context context;
|
|
|
|
@ -169,6 +170,7 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|
|
|
|
db.execSQL(LokiAPIDatabase.DROP_LEGACY_RECEIVED_HASHES);
|
|
|
|
|
db.execSQL(BlindedIdMappingDatabase.CREATE_BLINDED_ID_MAPPING_TABLE_COMMAND);
|
|
|
|
|
db.execSQL(GroupMemberDatabase.CREATE_GROUP_MEMBER_TABLE_COMMAND);
|
|
|
|
|
db.execSQL(LokiAPIDatabase.RESET_SEQ_NO); // probably not needed but consistent with all migrations
|
|
|
|
|
|
|
|
|
|
executeStatements(db, SmsDatabase.CREATE_INDEXS);
|
|
|
|
|
executeStatements(db, MmsDatabase.CREATE_INDEXS);
|
|
|
|
@ -385,6 +387,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|
|
|
|
db.execSQL(GroupMemberDatabase.CREATE_GROUP_MEMBER_TABLE_COMMAND);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (oldVersion < lokiV36) {
|
|
|
|
|
db.execSQL(LokiAPIDatabase.RESET_SEQ_NO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
|
} finally {
|
|
|
|
|
db.endTransaction();
|
|
|
|
|