db-command icon indicating copy to clipboard operation
db-command copied to clipboard

Refactor DB command file

Open schlessera opened this issue 6 years ago • 2 comments

The way options to the underlying mysql* tools are currently handled is extremely inconsistent.

This is a first try at making everything more consistent and ensuring that all tools can accept all allowed options.

schlessera avatar Jan 09 '20 16:01 schlessera

Most of the test failures look to be due to changing the command output by inserting the host, database, user and password params into the command. Updating the test snapshots should be acceptable accordingly. That said, do we need to be passing those params through in such a manner? I'm not sure why these items have changed from what was being done before.

ChrisWiegman avatar Jan 15 '20 18:01 ChrisWiegman

I'm not sure why these items have changed from what was being done before.

The goal with the refactor is to normalize the way DB settings are handled and make sure all commands behave in the same way, and this across all environments.

I would think that if passing settings like the user and host explicitly fails, that I'm missing something and I'm not using the correct settings.

schlessera avatar Jan 28 '20 16:01 schlessera

Proceeding with https://github.com/wp-cli/wp-cli/issues/5594 for this repository. I've captured this PR to https://gist.github.com/danielbachhuber/02870103195330ca2789ff8aa7b5774a in case this PR is auto-closed or broken in some way.

danielbachhuber avatar Nov 18 '22 15:11 danielbachhuber