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

db:dump - set connection name (so not only default_setup) #883

Open
kudja opened this issue Dec 14, 2016 · 3 comments
Open

db:dump - set connection name (so not only default_setup) #883

kudja opened this issue Dec 14, 2016 · 3 comments
Labels

Comments

@kudja
Copy link

kudja commented Dec 14, 2016

Can be usefull to dump from slave or dump not only main DB if used more than 1 db in project

So when getting connection we can pass connection name to N98\Magento\DbSettings.php and use it instead of default, same time default must be default_setup + it as predefined param in constructor. Such way we'll not broke anything and we adding ability to dump stripped any DB used in project

@tkn98 tkn98 added the feature label Dec 15, 2016
@pocallaghan
Copy link
Contributor

I'd imagine this is a relatively rare use case. Is this something you guys would be interested in having @tkn98? As one of the few people that actually does have multiple DBs, it's something that would be potentially useful to me, so I'm happy to take a crack at it. Presumably, if the feature does go ahead, it makes sense to add an optional argument for all DB related commands, defaulting to default_setup?

@ktomk
Copy link
Collaborator

ktomk commented Feb 16, 2017

In Magerun2 this has landed ca. 3 months ago (netz98/n98-magerun2#246) and just this morning I finished a first step of a bigger streamlining between the db:dump command in both versions. I still have to port DbSettings to Magento 2 which then would have a connectionType property which I think is this in Magento1, then we can backport this.

What you suggest looks similar to me to the PR in Magerun2, it's implemented via the AbstractDbCommand class and as far as I know it works well there. PRs are always welcome,

@tkn98
Copy link
Collaborator

tkn98 commented Feb 17, 2017

This is also related to #890 in regard to command-line parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants