Skip to content

Add --skip-tables=<tables> argument to exclude tables when performing search-replace#48

Merged
danielbachhuber merged 19 commits into
wp-cli:masterfrom
marksabbath:#31
Dec 4, 2017
Merged

Add --skip-tables=<tables> argument to exclude tables when performing search-replace#48
danielbachhuber merged 19 commits into
wp-cli:masterfrom
marksabbath:#31

Conversation

@marksabbath
Copy link
Copy Markdown
Contributor

Issue #31

  • Implemented a method to exclude tables by adding a new argument --skip-tables

@danielbachhuber danielbachhuber self-requested a review December 3, 2017 12:09
Copy link
Copy Markdown
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marksabbath !

Can you include functional tests for this change?

@marksabbath
Copy link
Copy Markdown
Contributor Author

Added functional tests @danielbachhuber as you've requested.

@danielbachhuber danielbachhuber added this to the 1.1.4 milestone Dec 3, 2017
@danielbachhuber danielbachhuber changed the title Issue #31 Add --skip-tables=<tables> argument to exclude tables when performing search-replace Dec 3, 2017
@danielbachhuber danielbachhuber added the command:search-replace Related to 'search-replace' command label Dec 3, 2017
Restrict some search-replace tests to wp_posts to avoid wp_options cl…
@danielbachhuber
Copy link
Copy Markdown
Member

@marksabbath Can you merge master for #49?

@marksabbath
Copy link
Copy Markdown
Contributor Author

Done by 282570e @danielbachhuber

@danielbachhuber danielbachhuber merged commit 25a580a into wp-cli:master Dec 4, 2017

foreach ( $tables as $table ) {

if ( in_array( $table, $this->skip_tables ) ) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note that this wasn't removed when the array_diff() was added and made it redundant.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, #50

@marksabbath marksabbath deleted the #31 branch December 4, 2017 15:28
danielbachhuber added a commit that referenced this pull request Nov 18, 2022
Add `--skip-tables=<tables>` argument to exclude tables when performing search-replace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:search-replace Related to 'search-replace' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants