From 5490ccf219e70a93a4fd6201960b52f346f2ccfd Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sat, 3 Nov 2018 14:41:49 -0400 Subject: [PATCH] Don't violate foreign key constraints on plugin removal --- includes/schema.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/schema.php b/includes/schema.php index f332d68..a8a5739 100644 --- a/includes/schema.php +++ b/includes/schema.php @@ -315,10 +315,12 @@ function purge_all_data() { {$pfx}pterotype_blocks, {$pfx}pterotype_shares, {$pfx}pterotype_following, {$pfx}pterotype_followers, {$pfx}pterotype_actor_likes, {$pfx}pterotype_object_likes, - {$pfx}pterotype_outbox, {$pfx}pterotype_inbox, - {$pfx}pterotype_objects, {$pfx}pterotype_actors + {$pfx}pterotype_outbox, {$pfx}pterotype_inbox " ) ); + $wpdb->query( $wpdb->prepare( + "DROP TABLE {$pfx}pterotype_objects, {$pfx}pterotype_actors" + ) ); \delete_option( 'pterotype_previously_migrated_version' ); } ?>