Skip to content

Commit 01cffbf

Browse files
committed
silently ignore skipped tables when only reporting changes
1 parent 9c0c05d commit 01cffbf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Search_Replace_Command.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,12 @@ public function __invoke( $args, $assoc_args ) {
302302
// since we'll be updating one row at a time,
303303
// we need a primary key to identify the row
304304
if ( empty( $primary_keys ) ) {
305-
if ( $this->report && ! $this->report_changed_only ) {
305+
306+
// wasn't updated, so skip to the next table
307+
if ( $this->report_changed_only ) {
308+
continue;
309+
}
310+
if ( $this->report ) {
306311
$report[] = array( $table, '', 'skipped', '' );
307312
} else {
308313
WP_CLI::warning( $all_columns ? "No primary keys for table '$table'." : "No such table '$table'." );

0 commit comments

Comments
 (0)