Docs: Remove --add-drop-table from wp db export OPTIONS; update example#324
Conversation
… example Agent-Logs-Url: https://github.com/wp-cli/db-command/sessions/4927b80f-46fa-482c-93fd-9fd1c6317e14 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
--add-drop-table to export command docblock--add-drop-table from wp db export OPTIONS; update example
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Updates the wp db export command documentation to avoid presenting --add-drop-table as a WP-CLI-specific option when it’s simply a mysqldump pass-through, and adjusts the example to show a scenario where that flag is actually meaningful.
Changes:
- Removed
--add-drop-tablefrom the documented OPTIONS list forwp db export. - Updated the primary example to use
--skip-opt --add-drop-tabletogether (explicitly re-enabling DROP TABLE statements after disabling--optdefaults).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * # Export database with `--skip-opt` and `--add-drop-table` mysqldump flags | ||
| * $ wp db export --skip-opt --add-drop-table |
There was a problem hiding this comment.
The new example uses pass-through mysqldump boolean flags (--skip-opt, --add-drop-table) without =<value>, but the OPTIONS synopsis currently documents extra mysqldump args only as [--<field>=<value>]. Consider updating that synopsis (or adding a short note near it) to clarify that valueless flags are supported too, otherwise this example can look like it contradicts the documented option format.
--add-drop-tableis already the defaultmysqldumpbehavior (enabled via--opt), so documenting it as a distinct WP-CLI option is misleading. The standalone example implied it had special significance when it does nothing beyond the default.Changes
[--add-drop-table]from the OPTIONS section — it's a plain mysqldump pass-through, not a WP-CLI-specific flag, and is already covered by[--<field>=<value>]--skip-optto explicitly re-enable DROP TABLE statements after disabling mysqldump's default--optbundle: