Merge pull request #2202 from k9mail/fix_db_migration
Exclude NULL from the list of used parts when cleaning up unused ones.
This commit is contained in:
commit
c007271b4e
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class MigrationTo58 {
|
|||
|
||||
private static void cleanUpMessagePartsTable(SQLiteDatabase db) {
|
||||
db.execSQL("DELETE FROM message_parts WHERE root NOT IN " +
|
||||
"(SELECT message_part_id FROM messages WHERE deleted = 0)");
|
||||
"(SELECT message_part_id FROM messages WHERE deleted = 0 AND message_part_id IS NOT NULL)");
|
||||
}
|
||||
|
||||
static void createDeleteMessageTrigger(SQLiteDatabase db) {
|
||||
|
|
Loading…
Reference in a new issue