-
-
Save mikaelz/9f98dcf9664c51e88900 to your computer and use it in GitHub Desktop.
To understand them, you go from bottom first, and then top2down:
- the first query filters for product_tag as taxonomy type, and deletes all terms, the connected taxonomies, and their relation-data
- the second query filters for product_cat as taxonomy type, and deletes all terms, the connected taxonomies, and their relation-data
To be honest, as i understand the docs, both queries specifiy to delete rows in terms and term_taxonomies only by writing a,c
To be honest, as i understand the docs
The docs on the database are few and far between, IIRC.
The solution here leaves orphans in other tables, so is not complete. The orhpans should be perhaps have been linked via a foreign key by the original programmers to prevent such issues, but we are where we are.
To be honest, as i understand the docs
The docs on the database are few and far between, IIRC.
The solution here leaves orphans in other tables, so is not complete. The orhpans should be perhaps have been linked via a foreign key by the original programmers to prevent such issues, but we are where we are.
I am actually woking on a project, where i need a good bunch of cleanup sql-queries, to get rid of all product, attribute category etc and also orders and customers. but the article below seems outdated:
https://www.businessbloomer.com/woocommerce-database-explained-how-it-works-and-where-to-find-data/
simply by looking i found **wc_product_attributes_lookup ** also worth for cleaning :(
if i finish the cleanup, ill try to summarize it
Would be nice to have some commentary on what the SQL queries are doing. I am getting old and spent 20 years away from databases ;)