0

Currently in the process of porting over a product database to a development database to make that the new production, I'm running into a few snags, and one is the question;

To bring over the customers along with their prior order sales history, I need to copy the exact SQL tables (sales_ and customer_) and bring them over as reuploading the customer database will have conflicting entity IDs with the prior sales history (from deleted entries and what not). My question then becomes, does the catalog need to be copied as well? Are the product IDs linked within the sales orders?

Preferably I would like to reupload the catalog, doing some cleaning and maintenance, but I fear this will mix up order history and possibly give wrong values/products in the orders. Any ideas?


Looking more into it:

I've now noticed the product IDs within the sales_flat_order_item table which looks like it assures my assumptions, is this used as the key for the order choices? or could the SKU or something else be used as more of an anchor?

All these constraints lead me to think the only way to continue a webstore is by using the exact same database, not leaving much opportunity for cleaning/updating and weeding out the old odds and ends?

1

You do not have to move the catalog.

Because Magento allows you to delete the products after an order was placed, it copies all of the relevant information into the various sales tables (mostly sales_flat_order_item). Therefore all of the pricing, product name and other data will remain in there even if you delete or change a product completely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.