Open peterwilsoncc opened 3 months ago
This example looks like mistake to me because even without that flag, SQL dump has DROP TABLE IF EXISTS
. May be it should be removed.
@swissspidy See above comment.
Hmm apologies, I missed this conversation here.
add-drop-table
is indeed the default in mysqldump
via the --opt
flag (which is enabled by default). See https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html#option_mysqldump_opt
It's useful when you do e.g. wp db export --skip-opt --add-drop-table
though.
I was perhaps a bit overly quick to merge #263. I realized we don't mention all the other mysqldump options in the docs, only the ones relevant for WP-CLI itself. So I think we should remove it again but make the docs and examples clearer what's for mysqldump and what's for WP-CLI.
Bug Report
Describe the current, buggy behavior
The first example in the
wp db export
docs includes the switch--add-drop-table
However the switch is not included in the options section of the docblock.
Describe how other contributors can replicate this bug
See https://developer.wordpress.org/cli/commands/db/export/
Describe what you would expect as the correct outcome
Add the switch to the options section
Let us know what environment you are running this on
Provide a possible solution
As above.
Provide additional context/Screenshots