From 4874baaeb8a3e68463d0c2c263c31951b89d4120 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Thu, 26 Oct 2023 11:52:38 -0400 Subject: [PATCH 1/3] Document what wp db check doesn't do; provide suggestions for next commands --- src/DB_Command.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DB_Command.php b/src/DB_Command.php index 1086fdec..b7ae6cb1 100644 --- a/src/DB_Command.php +++ b/src/DB_Command.php @@ -226,6 +226,9 @@ public function clean( $_, $assoc_args ) { * [See docs](http://dev.mysql.com/doc/refman/5.7/en/check-table.html) * for more details on the `CHECK TABLE` statement. * + * This command does not check whether WordPress is installed; + * to do that run `wp core is-installed`. + * * ## OPTIONS * * [--dbuser=] @@ -258,6 +261,8 @@ public function check( $_, $assoc_args ) { WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' ); WP_CLI::success( 'Database checked.' ); + WP_CLI::log( 'Check whether the WordPress DB tables are installed: wp core is-installed', 'db' ); + WP_CLI::log( 'Check whether the WordPress DB tables need to be updated: wp core update-db --dry-run', 'db' ); } /** From 7923571db2fa2355174cf23358eed8859bd1cf07 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Sat, 28 Oct 2023 14:42:33 -0400 Subject: [PATCH 2/3] Adjust help text --- src/DB_Command.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DB_Command.php b/src/DB_Command.php index b7ae6cb1..68b77551 100644 --- a/src/DB_Command.php +++ b/src/DB_Command.php @@ -261,8 +261,8 @@ public function check( $_, $assoc_args ) { WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' ); WP_CLI::success( 'Database checked.' ); - WP_CLI::log( 'Check whether the WordPress DB tables are installed: wp core is-installed', 'db' ); - WP_CLI::log( 'Check whether the WordPress DB tables need to be updated: wp core update-db --dry-run', 'db' ); + WP_CLI::log( 'To check whether the WordPress DB tables are installed: wp core is-installed', 'db' ); + WP_CLI::log( 'To check whether the WordPress DB tables need to be updated: wp core update-db --dry-run', 'db' ); } /** From 1debf788f416b059d085b47ed5f4628c538495cf Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Sat, 4 Nov 2023 21:10:17 -0400 Subject: [PATCH 3/3] Remove extra WP_CLI::log() statements --- src/DB_Command.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/DB_Command.php b/src/DB_Command.php index 68b77551..484d259c 100644 --- a/src/DB_Command.php +++ b/src/DB_Command.php @@ -261,8 +261,6 @@ public function check( $_, $assoc_args ) { WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' ); WP_CLI::success( 'Database checked.' ); - WP_CLI::log( 'To check whether the WordPress DB tables are installed: wp core is-installed', 'db' ); - WP_CLI::log( 'To check whether the WordPress DB tables need to be updated: wp core update-db --dry-run', 'db' ); } /**