-
Notifications
You must be signed in to change notification settings - Fork 224
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 - Limit product export #1010
Comments
@mvenghaus Nice idea. We use mysqldump in the background. I do not know if mysqldump supports that. |
@cmuench it should be possible with "--where" |
@cmuench .. i made a simple test and it worked. To make it work I've used a view to store the ids because LIMIT is not available in a subquery in mysql 5.7. But maybe my approach is too complicated ;)
|
@mvenghaus IMHO we should prevent sub-queries. Most of the ppl use db:dump for quick exports/backups. |
I've thought of this as well, but then for the
You'll end up with these 3 queries;
Which will create a partial dump of only the first 100 orders (of course this needs to be done for all other sales_order* tables as well). These steps should be automated in the
In the code, we can take that argument array, loop over it and explode on |
Feature description
It would be nice if there would be an option to limit the products on export.
Problem and motivation
If you have a lot of products and stores it's a pain to update the whole db. It most cases you only need a few products to successfully work in local development.
Or is there already on option and I missed it!?
Maybe something like this:
n98-magerun2 db:dump --strip="@development" --limit="@catalog_product:1000 custom_tables_*:1000 custom_table:1000"
The text was updated successfully, but these errors were encountered: