From baf1378b45e2e8986f1758298c8171fb28ff3ac3 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 4 Nov 2018 07:45:12 -0500 Subject: [PATCH] Run correct 1.2.1 migration --- includes/init.php | 2 +- includes/schema.php | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/init.php b/includes/init.php index dea95c8..b02d0c9 100644 --- a/includes/init.php +++ b/includes/init.php @@ -31,7 +31,7 @@ add_action( 'pterotype_init', function() { \pterotype\schema\run_migrations(); \pterotype\actors\initialize_actors(); if ( ! empty( ob_get_contents() ) ) { - error_log( ob_get_contents() ); + \error_log( ob_get_contents() ); } } ); diff --git a/includes/schema.php b/includes/schema.php index a1b6dcc..3dd39c5 100644 --- a/includes/schema.php +++ b/includes/schema.php @@ -22,7 +22,7 @@ function run_migrations() { apply_migration( '1.1.0', 'migration_1_1_0' ); apply_migration( '1.1.1', 'migration_1_1_1' ); apply_migration( '1.2.0', 'migration_1_2_0' ); - apply_migration( '1.2.1', 'migration_1_2_0' ); + apply_migration( '1.2.1', 'migration_1_2_1' ); update_option( 'pterotype_previously_migrated_version', PTEROTYPE_VERSION ); } @@ -318,15 +318,10 @@ 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_outbox, {$pfx}pterotype_inbox, + {$pfx}pterotype_actors, {$pfx}pterotype_objects " ) ); - $wpdb->query( $wpdb->prepare( - "DROP TABLE {$pfx}pterotype_actors" - ) ); - $wpdb->query( $wpdb->prepare( - "DROP TABLE {$pfx}pterotype_objects" - ) ); \delete_option( 'pterotype_previously_migrated_version' ); } ?>