Skip to content

Commit

Permalink
Move update setting
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spacedmonkey authored Jan 8, 2019
1 parent 21b0e83 commit bde5f48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mercator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
}

Expand Down

0 comments on commit bde5f48

Please sign in to comment.