gabba Posted October 31, 2012 Share Posted October 31, 2012 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 More sharing options...
benjamin utterback Posted October 31, 2012 Share Posted October 31, 2012 Hello gabba, thank you for this message, if you are starting fresh then the best way to do it is to completely delete your old Database and create a new database from scratch, this is to avoid any missing or conflicting values in the old database. Link to comment Share on other sites More sharing options...
gabba Posted November 1, 2012 Author Share Posted November 1, 2012 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 More sharing options...
benjamin utterback Posted November 1, 2012 Share Posted November 1, 2012 Hello, which version of PS are you looking to install? Link to comment Share on other sites More sharing options...
gabba Posted November 16, 2012 Author Share Posted November 16, 2012 I'm working on prestashop 1.5.2 , the new version... Link to comment Share on other sites More sharing options...
gabba Posted November 19, 2012 Author Share Posted November 19, 2012 Any thoughts on this Benjamin? should be easy enough to do a "reset" shouldn't it? Link to comment Share on other sites More sharing options...
Recommended Posts