sql Miva - 数据库表迁移StoreKey查询

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql Miva - 数据库表迁移StoreKey查询相关的知识,希望对你有一定的参考价值。

---
--- Module IDs
--- Run these queries on the new site after the tables have been copied over
---

UPDATE s01_OrderCharges SET module_id=122 WHERE module_id=118; # 10131 rows affected when imported on 2014-09-18
UPDATE s01_OrderCharges SET module_id=163 WHERE module_id=171; # 19900 rows affected when imported on 2014-09-18
UPDATE s01_OrderCharges SET module_id=184 WHERE module_id=179; # 9755 rows affected when imported on 2014-09-18

UPDATE s01_OrderPayments SET pay_id=107 WHERE pay_id=102; # 19883 rows affected when imported on 2014-09-18

UPDATE s01_Orders SET ship_id=122 WHERE ship_id=118; # 10129 rows affected when imported on 2014-09-18
UPDATE s01_Orders SET ship_id=184 WHERE ship_id=179; # 9754 rows affected when imported on 2014-09-18

---
--- Store keys
--- Run these to update the new site's Store Keys to the proper values
---

UPDATE s01_StoreKeys SET maxvalue=(SELECT id FROM s01_Customers ORDER BY id DESC LIMIT 1) WHERE type='Customers' LIMIT 1
UPDATE s01_StoreKeys SET maxvalue=(SELECT id FROM s01_OrderPayments ORDER BY id DESC LIMIT 1) WHERE type='OrderPayments' LIMIT 1
UPDATE s01_StoreKeys SET maxvalue=(SELECT id FROM s01_Orders ORDER BY id DESC LIMIT 1) WHERE type='Orders' LIMIT 1
UPDATE s01_StoreKeys SET maxvalue=(SELECT id FROM s01_OrderShipments ORDER BY id DESC LIMIT 1) WHERE type='OrderShipments' LIMIT 1
UPDATE s01_StoreKeys SET maxvalue=(SELECT line_id FROM s01_SS_REGISTRY_regprod ORDER BY line_id DESC LIMIT 1) WHERE type='SS_Registry' LIMIT 1

以上是关于sql Miva - 数据库表迁移StoreKey查询的主要内容,如果未能解决你的问题,请参考以下文章

sql Miva Merchant - 客户订单历史报告

sql Miva - 变体产品代码的主产品

sql Miva - 主产品代码中的所有变体

SQL Server迁移本机表数据信息

Oracle 数据库迁移一键创建源库表空间 SQL语句

Oracle 数据库迁移一键创建源库表空间 SQL语句