Skip to content

Commit cf9ee6c

Browse files
Copilotswissspidy
andauthored
Explain why certain tables can be skipped in search-replace (#221)
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent a04ff12 commit cf9ee6c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ multisite, this will just be the tables for the current site unless
2323
Search/replace intelligently handles PHP serialized data, and does not
2424
change primary key values.
2525

26+
Tables without a primary key are skipped. To check whether a table has a
27+
primary key, run `wp db query 'DESCRIBE <table>'` and look for 'PRI' in
28+
the Key column.
29+
2630
**OPTIONS**
2731

2832
[<old>]

src/Search_Replace_Command.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ class Search_Replace_Command extends WP_CLI_Command {
140140
* Search/replace intelligently handles PHP serialized data, and does not
141141
* change primary key values.
142142
*
143+
* Tables without a primary key are skipped. To check whether a table has a
144+
* primary key, run `wp db query 'DESCRIBE <table>'` and look for 'PRI' in
145+
* the Key column.
146+
*
143147
* ## OPTIONS
144148
*
145149
* [<old>]

0 commit comments

Comments
 (0)