Open ayusun opened 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.
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/