I have upgraded my magento to 1.7 but when I go to Sales --> Orders, it shows blank, and my lifetime sales and so forth is displayed as 0.

Now iv'e checked the sales_flat_order table, and it is empty. However, The table Sales_Order isn't and has the whole 31827 orders in there. I assume this is the old table used in

So, I am wondering is it possible to take across order history or not ? and if so how can I ensure that it is kept in upgrade?


Starting with Magento 1.4, the database structure has undergone substantial changes.

However, it's still possible to transfer all order data without losing anything. Here is the thread, where you can find an answer to your question:


  • I have gone through the upgrade and I am on 1.7 now. But orders in ver. were stored in the sales_order table. But 1.7 is in sales_flat_order. So, is there a way to transfer the orders to the new tables ? – Vaishal Patel Mar 3 '16 at 12:59

You should insert your old orders from sales_order table to sales_flat_order table. Manually add values for required fields if they are missing.

  • I have over 30,000 records so before going ahead with this, is there no other way and/or definite answer that it is not through a mistake or bad upgrade ? – Vaishal Patel Mar 3 '16 at 16:32
  • Try to check comments to the applied answer: magento.stackexchange.com/questions/33201/…. Are you sure that your setup script app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.3.99- is installed well? – Alexey Enikov Mar 7 '16 at 13:05
  • Have read through the post you've linked :) could you elaborate on installed well ? – Vaishal Patel Mar 7 '16 at 13:12
  • I have checked that script you've mentioned but sadly looks like it is not fully running: it has lines to Remove previous tables, but they still exist, so I guessing it is not running properly. What can I do different if I go back and rerun upgrade for the nth time – Vaishal Patel Mar 9 '16 at 9:27

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.