From bde5f487e2c64136544a1a9800e325ede86357ed Mon Sep 17 00:00:00 2001 From: Jonny Harris Date: Tue, 8 Jan 2019 12:27:06 +0000 Subject: [PATCH] Move update setting After the 1.0.3 version change, the plugin ALWAYS check to see if the table exists, as the version number never matches and never will as it is never updated. --- mercator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mercator.php b/mercator.php index 20dc415..e6f810e 100644 --- a/mercator.php +++ b/mercator.php @@ -219,6 +219,9 @@ function check_table() { $result = dbDelta( $schema ); $wpdb->ms_global_tables[] = 'domain_mapping'; + // Update db version option. + update_site_option( 'mercator.db.version', VERSION ); + if ( empty( $result ) ) { // No changes, database already exists and is up-to-date return 'exists'; @@ -227,9 +230,6 @@ function check_table() { // utf8mb4 conversion. maybe_convert_table_to_utf8mb4( $wpdb->dmtable ); - // Update db version option. - update_site_option( 'mercator.db.version', VERSION ); - return 'created'; }