Skip to content

Conversation

@astappiev
Copy link

Introduces the --exclude_tables_data option to the wp db export command, allowing users to export only the structure of specified tables while excluding their data.

Warning: only supported by MariaDB 10.1 and later. As far as I know, not supported by MySQL.

Resolves #289

Introduces the `--exclude_tables_data` option to the `wp db export` command, allowing users to export only the structure of specified tables while excluding their data. This enhances flexibility in database management and export processes.
@astappiev astappiev requested a review from a team as a code owner October 10, 2025 09:09
@swissspidy swissspidy requested a review from Copilot November 2, 2025 14:59
Copy link

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

This PR adds a new --exclude_tables_data parameter to the wp db export command, allowing users to export database table structures without their data. This is useful for excluding large tables like action scheduler logs while keeping the table schema.

Key Changes

  • Added --exclude_tables_data parameter support to export command
  • Implemented functionality using mysqldump's --ignore-table-data flag
  • Added documentation and examples for the new parameter

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/DB_Command.php Implemented --exclude_tables_data parameter handling and added documentation for the new feature
features/db-export.feature Added test scenario to verify table structure is exported while data is excluded
README.md Updated command synopsis and documentation to include the new parameter

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Giving multiple same arguments to mysqldump (via wp db export) only forwards the latest

1 participant