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'; }