Fix possible backup crash due to foreign key constraint.
This commit is contained in:
parent
84a61b01ca
commit
3c0b87bbca
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,8 @@ public class FullBackupImporter extends FullBackupBase {
|
||||||
"msl_message",
|
"msl_message",
|
||||||
"reaction",
|
"reaction",
|
||||||
"notification_profile_schedule",
|
"notification_profile_schedule",
|
||||||
"notification_profile_allowed_members"
|
"notification_profile_allowed_members",
|
||||||
|
"story_sends"
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void importFile(@NonNull Context context, @NonNull AttachmentSecret attachmentSecret,
|
public static void importFile(@NonNull Context context, @NonNull AttachmentSecret attachmentSecret,
|
||||||
|
@ -293,6 +294,7 @@ public class FullBackupImporter extends FullBackupBase {
|
||||||
String type = cursor.getString(1);
|
String type = cursor.getString(1);
|
||||||
|
|
||||||
if ("table".equals(type) && !name.startsWith("sqlite_")) {
|
if ("table".equals(type) && !name.startsWith("sqlite_")) {
|
||||||
|
Log.i(TAG, "Dropping table: " + name);
|
||||||
db.execSQL("DROP TABLE IF EXISTS " + name);
|
db.execSQL("DROP TABLE IF EXISTS " + name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue