magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

CLI Command to remove transaction data #97

Open ayusun opened 5 years ago

ayusun commented 5 years ago

There should be a utility to remove all the transaction data such as orders, customers, products, categories etc(all at once or separate command for each of them).

This way people won't have to run the truncate command which is error prone.

There are sample articles, but maybe not all are updated: https://codeblog.experius.nl/magento-2-remove-sample-data-test-data/

joshdavenport commented 5 years ago

Good idea yeah this would be nice. This could make automation of production to staging/development environments so much easier.

On top of that, while some of queries you find are fine, others miss tables. And there's alot of dangerous misinformation out there. Some are lacking bigger picture considerations: for example, I couldn't find any instance of queries including clearing sequence tables for multistore instances for example. This kind of thing could all be handled programatically.