You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: Add --add-drop-table to export command docblock #262
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.
Activity
ernilambar commentedon Aug 12, 2024
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.ernilambar commentedon Aug 12, 2024
@swissspidy See above comment.
swissspidy commentedon Aug 12, 2024
Hmm apologies, I missed this conversation here.
add-drop-tableis indeed the default inmysqldumpvia the--optflag (which is enabled by default). See https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html#option_mysqldump_optIt's useful when you do e.g.
wp db export --skip-opt --add-drop-tablethough.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.