Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update n98-magerun2 CLI to use a single insert with column names per row #1195

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

TuVanDev
Copy link
Contributor

Description: Update n98-magerun2 CLI to use a single insert with column names per row. This change will facilitate easier data searching through the dumped database file.

Details: By default, the mysqldump command generates INSERT query values on new lines, which complicates data searching through the dumped database file.
For example:

zgrep -P "VALUES\s*\(.*\d:\d:...*'" database.sql | awk '{print $3}' | uniq

Adding the --human-readable option to magerun will enforce a single insert with column names per row (equivalent to --extended-insert=FALSE in the mysqldump command).

Current:
bin/cli bin/n98-magerun2.phar "$@"

Proposed change:
bin/cli bin/n98-magerun2.phar --human-readable "$@"

This will make it easier to search the data through the dump database file.
Copy link

what-the-diff bot commented Jul 19, 2024

PR Summary

  • Addition of a New User-Friendly Flag for The Command
    The new --human-readable flag was integrated into the n98-magerun2 command. This update simplifies the outputted data for users, resulting in a more understandable and readable format.

@markshust markshust merged commit b35c8fc into markshust:release/next Jul 19, 2024
1 check passed
@piotrkwiecinski
Copy link
Contributor

@markshust @TuVanDev if it affects db dump shouldn't it in https://github.com/markshust/docker-magento/blob/release/next/compose/bin/mysqldump#L2 instead of all magerun commands?

n98-magerun2 should be just a bypass to a tool itself

@TuVanDev
Copy link
Contributor Author

Great catch! Thanks @piotrkwiecinski. I appreciate it.

I added it to bin/mysqldump while resolving the related issue in my project. However, when I went to open a new pull request to the repository, I accidentally made the change to bin/n98-magenrun2 😅 .

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.

3 participants