Remove all product data

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
cnoelker
Posts: 59
Joined: 20 Feb 2016, 18:21

Remove all product data

Post by cnoelker » 03 Oct 2019, 11:02

Hello,
what's the best way to reset all product data, including prices an media?
I would like to run an import with product data on a clean system, but without have to recreate any categories, attributes, etc.

One way would be to truncate the related tables. I did already identify:
mshop_catalog_list
mshop_media
mshop_index_*
mshop_price
mshop_price_list
mshop_product
mshop_product_list
mshop_stock
mshop_text

Did I identify all tables? Is it save to truncate them and then start a new import?
Claudia

User avatar
aimeos
Administrator
Posts: 3544
Joined: 01 Jan 1970, 00:00

Re: Remove all product data

Post by aimeos » 03 Oct 2019, 11:33

Use "DELETE" but not "TRUNCATE" because "DELETE" removes the records referenced by foreign keys as well:
- mshop_catalog_list
- mshop_media
- mshop_index_*
- mshop_price
- mshop_product
- mshop_stock
- mshop_text
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply