Skip to content

Docs: Remove --add-drop-table from wp db export OPTIONS; update example#324

Merged
swissspidy merged 2 commits intomainfrom
copilot/docs-add-add-drop-table-export-command
Apr 14, 2026
Merged

Docs: Remove --add-drop-table from wp db export OPTIONS; update example#324
swissspidy merged 2 commits intomainfrom
copilot/docs-add-add-drop-table-export-command

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

--add-drop-table is already the default mysqldump behavior (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

  • Removed [--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>]
  • Updated example to a case where the flag is actually meaningful: pairing it with --skip-opt to explicitly re-enable DROP TABLE statements after disabling mysqldump's default --opt bundle:
# Export database with `--skip-opt` and `--add-drop-table` mysqldump flags
$ wp db export --skip-opt --add-drop-table
Success: Exported to 'wordpress_dbase-db72bb5.sql'.

Copilot AI changed the title [WIP] Add --add-drop-table to export command docblock Docs: Remove --add-drop-table from wp db export OPTIONS; update example Apr 14, 2026
Copilot AI requested a review from swissspidy April 14, 2026 15:49
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy marked this pull request as ready for review April 14, 2026 17:01
@swissspidy swissspidy requested a review from a team as a code owner April 14, 2026 17:01
Copilot AI review requested due to automatic review settings April 14, 2026 17:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-table from the documented OPTIONS list for wp db export.
  • Updated the primary example to use --skip-opt --add-drop-table together (explicitly re-enabling DROP TABLE statements after disabling --opt defaults).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +672 to +673
* # Export database with `--skip-opt` and `--add-drop-table` mysqldump flags
* $ wp db export --skip-opt --add-drop-table
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@swissspidy swissspidy merged commit 2f0523f into main Apr 14, 2026
66 checks passed
@swissspidy swissspidy deleted the copilot/docs-add-add-drop-table-export-command branch April 14, 2026 17:44
@swissspidy swissspidy added this to the 2.1.6 milestone Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Add --add-drop-table to export command docblock

3 participants