search-replace-command icon indicating copy to clipboard operation
search-replace-command copied to clipboard

Clarify the allowed values for --skip-columns and --include-columns

Open johnbillion opened this issue 7 years ago • 2 comments

It's not clear from the documentation whether a fully qualified column name is allowed in the --skip-columns and --include-columns arguments, for example --skip-columns=wp_posts.guid.

This format is not supported, so I think the documentation should be updated to make this clear.

johnbillion avatar Aug 26 '18 13:08 johnbillion

I'm not a contributor, but I can say that when running a search/replace, more often than not I see guid table does get updated or shows that it's a table that is updated when I run

wp search-replace "http://olddom" "https://newdom" --all-tables --skip-columns=guid --skip-columns=user_email --precise --skip-plugins --skip-themes --report-changed-only

+-------------------------+---------------+--------------+------+
| Table                   | Column        | Replacements | Type |
+-------------------------+---------------+--------------+------+
| wp_options              | option_value  | 9            | PHP  |
| wp_postmeta             | meta_value    | 2            | PHP  |
| wp_posts                | post_content  | 67           | PHP  |
| wp_posts                | post_excerpt  | 28           | PHP  |
| wp_posts                | guid          | 600          | PHP  |
| wp_users                | user_url      | 1            | PHP  |
| wp_woocommerce_sessions | session_value | 1            | PHP  |
+-------------------------+---------------+--------------+------+
Success: Made 708 replacements. Please remember to flush your persistent object cache with `wp cache flush`.

dasbuilder avatar Jan 27 '19 06:01 dasbuilder

@dasbuilder Would you mind opening a separate issue for the above? This looks like a bug we should investigate.

schlessera avatar Feb 12 '19 04:02 schlessera