Clear DATA_HASH column.
This commit is contained in:
parent
17f850b31a
commit
7f96ee0b62
1 changed files with 8 additions and 2 deletions
|
@ -14,12 +14,12 @@ import androidx.annotation.NonNull;
|
|||
import android.text.TextUtils;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
import net.sqlcipher.database.SQLiteDatabase;
|
||||
import net.sqlcipher.database.SQLiteDatabaseHook;
|
||||
import net.sqlcipher.database.SQLiteOpenHelper;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationContext;
|
||||
import org.thoughtcrime.securesms.crypto.DatabaseSecret;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.AttachmentDatabase;
|
||||
|
@ -89,8 +89,9 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|||
private static final int MMS_RECIPIENT_CLEANUP_2 = 31;
|
||||
private static final int ATTACHMENT_TRANSFORM_PROPERTIES = 32;
|
||||
private static final int ATTACHMENT_CLEAR_HASHES = 33;
|
||||
private static final int ATTACHMENT_CLEAR_HASHES_2 = 34;
|
||||
|
||||
private static final int DATABASE_VERSION = 33;
|
||||
private static final int DATABASE_VERSION = 34;
|
||||
private static final String DATABASE_NAME = "signal.db";
|
||||
|
||||
private final Context context;
|
||||
|
@ -608,6 +609,11 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|||
db.execSQL("UPDATE part SET data_hash = null");
|
||||
}
|
||||
|
||||
if (oldVersion < ATTACHMENT_CLEAR_HASHES_2) {
|
||||
db.execSQL("UPDATE part SET data_hash = null");
|
||||
Glide.get(context).clearDiskCache();
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
|
|
Loading…
Add table
Reference in a new issue