Jump to content

Starting fresh - clearing the database..


Recommended Posts

Running multiple instals and imports on prestashop, and it would be great to have a simple sql TRUNCATE query that set a prestashop install back to a clean slate, ie cleared all customers/ orders / products / reviews/ carts, but none of the settings,,

 

Anyone ever create something like that? Which tables should i clear out?

Link to comment
Share on other sites

But that would also clear all the settings as well, i'd rather just clear all the products/ customers / carts, its about updating all the contents of the shop, not the shop functions itself..

 

I came across this query:

TRUNCATE TABLE `ps_customer`;

TRUNCATE TABLE `ps_customer_group`;

TRUNCATE TABLE `ps_address`;

TRUNCATE TABLE `ps_orders`;

TRUNCATE TABLE `ps_order_detail`;

TRUNCATE TABLE `ps_order_discount`;

TRUNCATE TABLE `ps_order_history`;

TRUNCATE TABLE `ps_message`;

TRUNCATE TABLE `ps_cart`;

TRUNCATE TABLE `ps_cart_product`;

TRUNCATE TABLE `ps_cart_discount`;

 

But it refers to an old version of the software..

 

 

I'm tempted to go through each table to check its relevence as most are quite obvious, is there not a page in the wiki that explains what each db table does?

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...