Skip to content
Snippets Groups Projects
Commit 3c0b87bb authored by Greyson Parrelli's avatar Greyson Parrelli
Browse files

Fix possible backup crash due to foreign key constraint.

parent 84a61b01
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,8 @@ public class FullBackupImporter extends FullBackupBase { ...@@ -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 { ...@@ -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);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment