浏览代码

数据迁移的存储过程[14][用函数进行优化]

lin.chen 7 年之前
父节点
当前提交
29cf926461
共有 34 个文件被更改,包括 183 次插入599 次删除
  1. 6 1
      TRS.WCM.Developer/贵州项目/sp/1_data_migration_logger.sql
  2. 93 0
      TRS.WCM.Developer/贵州项目/sp/2_data_migration_function.sql
  3. 32 0
      TRS.WCM.Developer/贵州项目/sp/3_call_data_migration_function.sql
  4. 0 87
      TRS.WCM.Developer/贵州项目/sp/call_p_city1.sql
  5. 0 87
      TRS.WCM.Developer/贵州项目/sp/call_p_city2.sql
  6. 0 87
      TRS.WCM.Developer/贵州项目/sp/call_p_city3.sql
  7. 0 86
      TRS.WCM.Developer/贵州项目/sp/call_p_city4.sql
  8. 0 87
      TRS.WCM.Developer/贵州项目/sp/call_p_city5.sql
  9. 0 86
      TRS.WCM.Developer/贵州项目/sp/call_p_city6.sql
  10. 0 25
      TRS.WCM.Developer/贵州项目/sp/call_p_mas.sql
  11. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_masid.sql
  12. 6 6
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_masvideo.sql
  13. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmappendix.sql
  14. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannel.sql
  15. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelchildindexquote.sql
  16. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelsyn.sql
  17. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchnldoc.sql
  18. 2 3
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmdocument.sql
  19. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmfolderpublishconfig.sql
  20. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmmetatable.sql
  21. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplate.sql
  22. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateargument.sql
  23. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateemploy.sql
  24. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatenest.sql
  25. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatequote.sql
  26. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmwebsite.sql
  27. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfo.sql
  28. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfoview.sql
  29. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmdbfieldinfo.sql
  30. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewemployer.sql
  31. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewfieldgroup.sql
  32. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmtableinfo.sql
  33. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewfieldinfo.sql
  34. 2 2
      TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewinfo.sql

+ 6 - 1
TRS.WCM.Developer/贵州项目/sp/1_data_migration_log.sql → TRS.WCM.Developer/贵州项目/sp/1_data_migration_logger.sql

@@ -7,7 +7,7 @@ USE trs_data_migration;
 
 CREATE TABLE data_migration_log(
   table_name VARCHAR(100) NOT NULL COMMENT '迁移的表名',
-  prev_id BIGINT(20) NOT NULL COMMENT '上一条数据ID,-1 表示迁移完毕',
+  prev_id BIGINT(20) NOT NULL COMMENT '上一条数据ID',
   PRIMARY KEY (table_name)
 );
 
@@ -22,6 +22,11 @@ CREATE FUNCTION build_migration_log_sql(table_name VARCHAR(100), id BIGINT(20))
   RETURNS VARCHAR(255)
   BEGIN
     DECLARE x VARCHAR(255) DEFAULT '';
+
+    IF (id < 0)
+      THEN SET id = 1000000000;
+    END IF ;
+
     SET x =  concat('insert into ',
                     'trs_data_migration.data_migration_log (',
                     'table_name, ',

+ 93 - 0
TRS.WCM.Developer/贵州项目/sp/2_data_migration_function.sql

@@ -0,0 +1,93 @@
+USE trs_data_migration;
+
+SET GLOBAL log_bin_trust_function_creators = TRUE;
+DROP FUNCTION IF EXISTS data_migration_function;
+DELIMITER $$
+CREATE FUNCTION data_migration_function(n INT)
+  RETURNS VARCHAR(255)
+  BEGIN
+
+    use trs_hycloud_iip;
+
+    # 每迁移一个wcm节点,@n 必须 +1
+    SET @n = n;
+
+    # 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
+    SET @citySuffix = concat('_city', @n);
+
+    # 支持断点续传,上一次迁移的最后一个 xx ID
+    SET @prevSiteId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmwebsite'), 0);
+    SET @prevChannelId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmchannel'), 0);
+    SET @prevRecId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmchnldoc'), 0);
+    SET @prevDocId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmdocument'), 0);
+    SET @prevChannelSynId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmchannelsyn'), 0);
+    SET @prevFolderPublishConfigId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmfolderpublishconfig'), 0);
+    SET @prevTemplateId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmtemplate'), 0);
+    SET @prevTemplateArgId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmtemplateargument'), 0);
+    SET @prevTemplateEmployId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmtemplateemploy'), 0);
+    SET @prevTemplateNestId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmtemplatenest'), 0);
+    SET @prevTemplateQuoteId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmtemplatequote'), 0);
+    SET @prevClassInfoId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmclassinfo'), 0);
+    SET @prevClassInfoViewId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmclassinfoview'), 0);
+    SET @prevFieldId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmdbfieldinfo'), 0);
+    SET @prevMetaViewEmployerId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmmetaviewemployer'), 0);
+    SET @prevTableInfoId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmmetableinfo'), 0);
+    SET @prevViewFieldId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmviewfieldinfo'), 0);
+    SET @prevViewId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmviewinfo'), 0);
+    SET @prevMetaViewFieldGroupId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'xwcmmetaviewfieldgroup'), 0);
+    SET @prevAppendixId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'wcmappendix'), 0);
+
+
+
+    # xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
+    SET @siteIdOffset = 1000 * @n;
+    SET @channelIdOffset = 100000 * @n;
+    SET @channelSynIdOffset = 100000 * @n;
+    SET @templateIdOffset = 100000 * @n;
+    SET @recIdOffset = 10000000 * @n;
+    SET @docIdOffset = 10000000 * @n;
+    SET @viewIdOffset = 1000 * @n;
+    SET @folderPublishConfigIdOffset = 100000 * @n;
+    SET @templateArgIdOffset = 100000 * @n;
+    SET @templateEmployIdOffset = 1000000 * @n;
+    SET @templateNestIdOffset = 100000 * @n;
+    SET @templateQuoteIdOffset = 1000000 * @n;
+    SET @classInfoIdOffset = 10000 * @n;
+    SET @fieldIdOffset = 100000 * @n;
+    SET @tableInfoIdOffset = 1000 * @n;
+    SET @metaViewEmployerIdOffset = 100000 * @n;
+    SET @viewFieldIdOffset = 100000 * @n;
+    SET @dbFieldIdOffset = 100000 * @n;
+    SET @fieldGroupIdOffset = 1000 * @n;
+    SET @metaViewFieldGroupIdOffset = 1000 * @n;
+    SET @appendixIdOffset = 10000000 * @n;
+
+
+
+    call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
+    call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
+    call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
+    call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
+    call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
+    call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
+    call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
+    call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
+    call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
+    call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
+    call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
+    call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
+    call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
+    call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
+
+
+
+    RETURN 'OK';
+  END $$

+ 32 - 0
TRS.WCM.Developer/贵州项目/sp/3_call_data_migration_function.sql

@@ -0,0 +1,32 @@
+
+# 迁移第一个wcm节点
+CALL trs_data_migration.data_migration_function(1);
+
+# 迁移第2个wcm节点
+CALL trs_data_migration.data_migration_function(2);
+
+# 迁移第3个wcm节点
+CALL trs_data_migration.data_migration_function(3);
+
+# 迁移第4个wcm节点
+CALL trs_data_migration.data_migration_function(4);
+
+# 迁移第5个wcm节点
+CALL trs_data_migration.data_migration_function(5);
+
+# 迁移第6个wcm节点
+CALL trs_data_migration.data_migration_function(6);
+
+
+
+# 迁移 MAS 视频,6个wcm节点的视频是在一起的
+
+# 支持断点续传,上一次迁移的最后一个 xx ID
+SET @prevMasId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'mas_masid'), 0);
+SET @prevMasVideoId = ifnull((SELECT prev_id from trs_data_migration.data_migration_log where table_name = 'mas_masvideo'), 0);
+
+SET @masIdOffset = 100000;
+SET @masVideoIdOffset = 100000;
+
+call trs_data_migration.p_data_migration_masid(@prevMasId, @masIdOffset);
+call trs_data_migration.p_data_migration_masvideo(@prevMasVideoId, @masVideoIdOffset);

+ 0 - 87
TRS.WCM.Developer/贵州项目/sp/call_p_city1.sql

@@ -1,87 +0,0 @@
-
-
-
-use trs_hycloud_iip;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 1;
-
-# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
-SET @citySuffix = concat('_city', @n);
-
-
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevSiteId = 0;
-SET @prevChannelId = 0;
-SET @prevRecId = 0;
-SET @prevDocId = 0;
-SET @prevChannelSynId = 0;
-SET @prevFolderPublishConfigId = 0;
-SET @prevTemplateId = 0;
-SET @prevTemplateArgId = 0;
-SET @prevTemplateEmployId = 0;
-SET @prevTemplateNestId = 0;
-SET @prevTemplateQuoteId = 0;
-SET @prevClassInfoId = 0;
-SET @prevClassInfoViewId = 0;
-SET @prevFieldId = 0;
-SET @prevMetaViewEmployerId = 0;
-SET @prevTableInfoId = 0;
-SET @prevViewFieldId = 0;
-SET @prevViewId = 0;
-SET @prevMetaViewFieldGroupId = 0;
-SET @prevAppendixId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @siteIdOffset = 1000 * @n;
-SET @channelIdOffset = 100000 * @n;
-SET @channelSynIdOffset = 100000 * @n;
-SET @templateIdOffset = 100000 * @n;
-SET @recIdOffset = 10000000 * @n;
-SET @docIdOffset = 10000000 * @n;
-SET @viewIdOffset = 1000 * @n;
-SET @folderPublishConfigIdOffset = 100000 * @n;
-SET @templateArgIdOffset = 100000 * @n;
-SET @templateEmployIdOffset = 1000000 * @n;
-SET @templateNestIdOffset = 100000 * @n;
-SET @templateQuoteIdOffset = 1000000 * @n;
-SET @classInfoIdOffset = 10000 * @n;
-SET @fieldIdOffset = 100000 * @n;
-SET @tableInfoIdOffset = 1000 * @n;
-SET @metaViewEmployerIdOffset = 100000 * @n;
-SET @viewFieldIdOffset = 100000 * @n;
-SET @dbFieldIdOffset = 100000 * @n;
-SET @fieldGroupIdOffset = 1000 * @n;
-SET @metaViewFieldGroupIdOffset = 1000 * @n;
-SET @appendixIdOffset = 10000000 * @n;
-
-
-
-call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
-call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
-call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
-call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
-call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
-call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
-call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
-call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
-call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
-call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
-call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
-
-

+ 0 - 87
TRS.WCM.Developer/贵州项目/sp/call_p_city2.sql

@@ -1,87 +0,0 @@
-
-
-
-use trs_hycloud_iip;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 2;
-
-# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
-SET @citySuffix = concat('_city', @n);
-
-
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevSiteId = 0;
-SET @prevChannelId = 0;
-SET @prevRecId = 0;
-SET @prevDocId = 0;
-SET @prevChannelSynId = 0;
-SET @prevFolderPublishConfigId = 0;
-SET @prevTemplateId = 0;
-SET @prevTemplateArgId = 0;
-SET @prevTemplateEmployId = 0;
-SET @prevTemplateNestId = 0;
-SET @prevTemplateQuoteId = 0;
-SET @prevClassInfoId = 0;
-SET @prevClassInfoViewId = 0;
-SET @prevFieldId = 0;
-SET @prevMetaViewEmployerId = 0;
-SET @prevTableInfoId = 0;
-SET @prevViewFieldId = 0;
-SET @prevViewId = 0;
-SET @prevMetaViewFieldGroupId = 0;
-SET @prevAppendixId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @siteIdOffset = 1000 * @n;
-SET @channelIdOffset = 100000 * @n;
-SET @channelSynIdOffset = 100000 * @n;
-SET @templateIdOffset = 100000 * @n;
-SET @recIdOffset = 10000000 * @n;
-SET @docIdOffset = 10000000 * @n;
-SET @viewIdOffset = 1000 * @n;
-SET @folderPublishConfigIdOffset = 100000 * @n;
-SET @templateArgIdOffset = 100000 * @n;
-SET @templateEmployIdOffset = 1000000 * @n;
-SET @templateNestIdOffset = 100000 * @n;
-SET @templateQuoteIdOffset = 1000000 * @n;
-SET @classInfoIdOffset = 10000 * @n;
-SET @fieldIdOffset = 100000 * @n;
-SET @tableInfoIdOffset = 1000 * @n;
-SET @metaViewEmployerIdOffset = 100000 * @n;
-SET @viewFieldIdOffset = 100000 * @n;
-SET @dbFieldIdOffset = 100000 * @n;
-SET @fieldGroupIdOffset = 1000 * @n;
-SET @metaViewFieldGroupIdOffset = 1000 * @n;
-SET @appendixIdOffset = 10000000 * @n;
-
-
-
-call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
-call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
-call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
-call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
-call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
-call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
-call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
-call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
-call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
-call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
-call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
-
-

+ 0 - 87
TRS.WCM.Developer/贵州项目/sp/call_p_city3.sql

@@ -1,87 +0,0 @@
-
-
-
-use trs_hycloud_iip;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 3;
-
-# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
-SET @citySuffix = concat('_city', @n);
-
-
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevSiteId = 0;
-SET @prevChannelId = 0;
-SET @prevRecId = 0;
-SET @prevDocId = 0;
-SET @prevChannelSynId = 0;
-SET @prevFolderPublishConfigId = 0;
-SET @prevTemplateId = 0;
-SET @prevTemplateArgId = 0;
-SET @prevTemplateEmployId = 0;
-SET @prevTemplateNestId = 0;
-SET @prevTemplateQuoteId = 0;
-SET @prevClassInfoId = 0;
-SET @prevClassInfoViewId = 0;
-SET @prevFieldId = 0;
-SET @prevMetaViewEmployerId = 0;
-SET @prevTableInfoId = 0;
-SET @prevViewFieldId = 0;
-SET @prevViewId = 0;
-SET @prevMetaViewFieldGroupId = 0;
-SET @prevAppendixId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @siteIdOffset = 1000 * @n;
-SET @channelIdOffset = 100000 * @n;
-SET @channelSynIdOffset = 100000 * @n;
-SET @templateIdOffset = 100000 * @n;
-SET @recIdOffset = 10000000 * @n;
-SET @docIdOffset = 10000000 * @n;
-SET @viewIdOffset = 1000 * @n;
-SET @folderPublishConfigIdOffset = 100000 * @n;
-SET @templateArgIdOffset = 100000 * @n;
-SET @templateEmployIdOffset = 1000000 * @n;
-SET @templateNestIdOffset = 100000 * @n;
-SET @templateQuoteIdOffset = 1000000 * @n;
-SET @classInfoIdOffset = 10000 * @n;
-SET @fieldIdOffset = 100000 * @n;
-SET @tableInfoIdOffset = 1000 * @n;
-SET @metaViewEmployerIdOffset = 100000 * @n;
-SET @viewFieldIdOffset = 100000 * @n;
-SET @dbFieldIdOffset = 100000 * @n;
-SET @fieldGroupIdOffset = 1000 * @n;
-SET @metaViewFieldGroupIdOffset = 1000 * @n;
-SET @appendixIdOffset = 10000000 * @n;
-
-
-
-call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
-call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
-call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
-call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
-call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
-call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
-call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
-call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
-call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
-call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
-call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
-
-

+ 0 - 86
TRS.WCM.Developer/贵州项目/sp/call_p_city4.sql

@@ -1,86 +0,0 @@
-
-
-
-use trs_hycloud_iip;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 4;
-
-# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
-SET @citySuffix = concat('_city', @n);
-
-
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevSiteId = 0;
-SET @prevChannelId = 0;
-SET @prevRecId = 0;
-SET @prevDocId = 0;
-SET @prevChannelSynId = 0;
-SET @prevFolderPublishConfigId = 0;
-SET @prevTemplateId = 0;
-SET @prevTemplateArgId = 0;
-SET @prevTemplateEmployId = 0;
-SET @prevTemplateNestId = 0;
-SET @prevTemplateQuoteId = 0;
-SET @prevClassInfoId = 0;
-SET @prevClassInfoViewId = 0;
-SET @prevFieldId = 0;
-SET @prevMetaViewEmployerId = 0;
-SET @prevTableInfoId = 0;
-SET @prevViewFieldId = 0;
-SET @prevViewId = 0;
-SET @prevMetaViewFieldGroupId = 0;
-SET @prevAppendixId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @siteIdOffset = 1000 * @n;
-SET @channelIdOffset = 100000 * @n;
-SET @channelSynIdOffset = 100000 * @n;
-SET @templateIdOffset = 100000 * @n;
-SET @recIdOffset = 10000000 * @n;
-SET @docIdOffset = 10000000 * @n;
-SET @viewIdOffset = 1000 * @n;
-SET @folderPublishConfigIdOffset = 100000 * @n;
-SET @templateArgIdOffset = 100000 * @n;
-SET @templateEmployIdOffset = 1000000 * @n;
-SET @templateNestIdOffset = 100000 * @n;
-SET @templateQuoteIdOffset = 1000000 * @n;
-SET @classInfoIdOffset = 10000 * @n;
-SET @fieldIdOffset = 100000 * @n;
-SET @tableInfoIdOffset = 1000 * @n;
-SET @metaViewEmployerIdOffset = 100000 * @n;
-SET @viewFieldIdOffset = 100000 * @n;
-SET @dbFieldIdOffset = 100000 * @n;
-SET @fieldGroupIdOffset = 1000 * @n;
-SET @metaViewFieldGroupIdOffset = 1000 * @n;
-SET @appendixIdOffset = 10000000 * @n;
-
-
-
-call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
-call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
-call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
-call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
-call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
-call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
-call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
-call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
-call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
-call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
-call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
-

+ 0 - 87
TRS.WCM.Developer/贵州项目/sp/call_p_city5.sql

@@ -1,87 +0,0 @@
-
-
-
-use trs_hycloud_iip;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 5;
-
-# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
-SET @citySuffix = concat('_city', @n);
-
-
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevSiteId = 0;
-SET @prevChannelId = 0;
-SET @prevRecId = 0;
-SET @prevDocId = 0;
-SET @prevChannelSynId = 0;
-SET @prevFolderPublishConfigId = 0;
-SET @prevTemplateId = 0;
-SET @prevTemplateArgId = 0;
-SET @prevTemplateEmployId = 0;
-SET @prevTemplateNestId = 0;
-SET @prevTemplateQuoteId = 0;
-SET @prevClassInfoId = 0;
-SET @prevClassInfoViewId = 0;
-SET @prevFieldId = 0;
-SET @prevMetaViewEmployerId = 0;
-SET @prevTableInfoId = 0;
-SET @prevViewFieldId = 0;
-SET @prevViewId = 0;
-SET @prevMetaViewFieldGroupId = 0;
-SET @prevAppendixId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @siteIdOffset = 1000 * @n;
-SET @channelIdOffset = 100000 * @n;
-SET @channelSynIdOffset = 100000 * @n;
-SET @templateIdOffset = 100000 * @n;
-SET @recIdOffset = 10000000 * @n;
-SET @docIdOffset = 10000000 * @n;
-SET @viewIdOffset = 1000 * @n;
-SET @folderPublishConfigIdOffset = 100000 * @n;
-SET @templateArgIdOffset = 100000 * @n;
-SET @templateEmployIdOffset = 1000000 * @n;
-SET @templateNestIdOffset = 100000 * @n;
-SET @templateQuoteIdOffset = 1000000 * @n;
-SET @classInfoIdOffset = 10000 * @n;
-SET @fieldIdOffset = 100000 * @n;
-SET @tableInfoIdOffset = 1000 * @n;
-SET @metaViewEmployerIdOffset = 100000 * @n;
-SET @viewFieldIdOffset = 100000 * @n;
-SET @dbFieldIdOffset = 100000 * @n;
-SET @fieldGroupIdOffset = 1000 * @n;
-SET @metaViewFieldGroupIdOffset = 1000 * @n;
-SET @appendixIdOffset = 10000000 * @n;
-
-
-
-call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
-call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
-call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
-call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
-call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
-call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
-call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
-call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
-call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
-call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
-call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
-
-

+ 0 - 86
TRS.WCM.Developer/贵州项目/sp/call_p_city6.sql

@@ -1,86 +0,0 @@
-
-
-use trs_hycloud_iip;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 6;
-
-# 每个wcm节点,元数据表需要加上后缀,以区分同名元数据表
-SET @citySuffix = concat('_city', @n);
-
-
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevSiteId = 0;
-SET @prevChannelId = 0;
-SET @prevRecId = 0;
-SET @prevDocId = 0;
-SET @prevChannelSynId = 0;
-SET @prevFolderPublishConfigId = 0;
-SET @prevTemplateId = 0;
-SET @prevTemplateArgId = 0;
-SET @prevTemplateEmployId = 0;
-SET @prevTemplateNestId = 0;
-SET @prevTemplateQuoteId = 0;
-SET @prevClassInfoId = 0;
-SET @prevClassInfoViewId = 0;
-SET @prevFieldId = 0;
-SET @prevMetaViewEmployerId = 0;
-SET @prevTableInfoId = 0;
-SET @prevViewFieldId = 0;
-SET @prevViewId = 0;
-SET @prevMetaViewFieldGroupId = 0;
-SET @prevAppendixId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @siteIdOffset = 1000 * @n;
-SET @channelIdOffset = 100000 * @n;
-SET @channelSynIdOffset = 100000 * @n;
-SET @templateIdOffset = 100000 * @n;
-SET @recIdOffset = 10000000 * @n;
-SET @docIdOffset = 10000000 * @n;
-SET @viewIdOffset = 1000 * @n;
-SET @folderPublishConfigIdOffset = 100000 * @n;
-SET @templateArgIdOffset = 100000 * @n;
-SET @templateEmployIdOffset = 1000000 * @n;
-SET @templateNestIdOffset = 100000 * @n;
-SET @templateQuoteIdOffset = 1000000 * @n;
-SET @classInfoIdOffset = 10000 * @n;
-SET @fieldIdOffset = 100000 * @n;
-SET @tableInfoIdOffset = 1000 * @n;
-SET @metaViewEmployerIdOffset = 100000 * @n;
-SET @viewFieldIdOffset = 100000 * @n;
-SET @dbFieldIdOffset = 100000 * @n;
-SET @fieldGroupIdOffset = 1000 * @n;
-SET @metaViewFieldGroupIdOffset = 1000 * @n;
-SET @appendixIdOffset = 10000000 * @n;
-
-
-
-call p_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
-call p_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
-call p_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
-call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
-call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
-call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
-call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
-call p_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
-call p_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
-call p_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
-call p_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
-call p_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
-call p_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
-
-

+ 0 - 25
TRS.WCM.Developer/贵州项目/sp/call_p_mas.sql

@@ -1,25 +0,0 @@
-
-
-
-pager cat >> /home/data_migration_mas.log;
-
-use trs_mas;
-
-# 每迁移一个wcm节点,@n 必须手动 +1
-SET @n = 1;
-
-
-# 支持断点续传,上一次迁移的最后一个 xx ID
-SET @prevMasId = 0;
-
-
-
-# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
-SET @masIdOffset = 100000 * @n;
-
-
-
-call p_data_migration_masid(@prevMasId, @masIdOffset);
-call p_data_migration_masvideo(@prevMasId, @masIdOffset);
-
-nopager;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_masid.sql

@@ -1,5 +1,5 @@
 
-use trs_mas;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_masid;
 DELIMITER $$
@@ -31,7 +31,7 @@ CREATE PROCEDURE p_data_migration_masid(IN prevMasId BIGINT(20),
         LASTMODIFIEDUSER,
         LASTMODIFIEDUSERID,
         srcObjType
-      FROM v_mas.mas_masid
+      FROM trs_data_migration.mas_masid
       ORDER BY ID asc;
 
     DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 6 - 6
TRS.WCM.Developer/贵州项目/sp/p_data_migration_masvideo.sql

@@ -1,10 +1,10 @@
 
-use trs_mas;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_masvideo;
 DELIMITER $$
-CREATE PROCEDURE p_data_migration_masvideo(IN prevMasId BIGINT(20),
-                                              IN masIdOffset BIGINT(20))
+CREATE PROCEDURE p_data_migration_masvideo(IN prevMasVideoId BIGINT(20),
+                                              IN masVideoIdOffset BIGINT(20))
 	BEGIN 
 	
 	DECLARE isover INT DEFAULT 0;
@@ -213,7 +213,7 @@ CREATE PROCEDURE p_data_migration_masvideo(IN prevMasId BIGINT(20),
       UNPASSTYPE,
       VIDEOURL,
       YEAR
-    FROM v_mas.mas_masvideo
+    FROM trs_data_migration.mas_masvideo
 		ORDER BY ID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;
@@ -328,12 +328,12 @@ CREATE PROCEDURE p_data_migration_masvideo(IN prevMasId BIGINT(20),
     WHILE isover= 0 DO
 
       # 断点续传
-      IF (f_ID > prevMasId)
+      IF (f_ID > prevMasVideoId)
 
         THEN
 
             SET @ID = f_ID;
-            SET f_ID = f_ID + masIdOffset;
+            SET f_ID = f_ID + masVideoIdOffset;
 
             insert into trs_mas.mas_masvideo
               (

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmappendix.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmappendix;
 DELIMITER $$
@@ -65,7 +65,7 @@ CREATE PROCEDURE p_data_migration_wcmappendix(IN prevAppendixId BIGINT(20),
       ATTRIBUTES,
       AppFromType,
       AppFromId
-    FROM v_wcm.wcmappendix
+    FROM trs_data_migration.wcmappendix
 		ORDER BY APPENDIXID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannel.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmchannel;
 DELIMITER $$
@@ -115,7 +115,7 @@ CREATE PROCEDURE p_data_migration_wcmchannel(IN prevChnlId BIGINT(20),
       CHANNELLOGO,
       SEARCHWORDVALUE,
       CHNLDESCPINYIN
-    FROM v_wcm.wcmchannel
+    FROM trs_data_migration.wcmchannel
 		ORDER BY channelid asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelchildindexquote.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmchannelchildindexquote;
 DELIMITER $$
@@ -22,7 +22,7 @@ CREATE PROCEDURE p_data_migration_wcmchannelchildindexquote(IN templateIdOffset
       FOLDERTYPE,
       FOLDERID,
       QUOTECHANNELID
-    FROM v_wcm.wcmchannelchildindexquote;
+    FROM trs_data_migration.wcmchannelchildindexquote;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;
 	

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchannelsyn.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmchannelsyn;
 DELIMITER $$
@@ -40,7 +40,7 @@ CREATE PROCEDURE p_data_migration_wcmchannelsyn(IN prevChannelSynId BIGINT(20),
       SYNTYPES,
       OPERAFTER,
       CLASSINFOIDS
-    FROM v_wcm.wcmchannelsyn
+    FROM trs_data_migration.wcmchannelsyn
     ORDER BY CHANNELSYNID ASC ;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmchnldoc.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmchnldoc;
 DELIMITER $$
@@ -96,7 +96,7 @@ CREATE PROCEDURE p_data_migration_wcmchnldoc(IN prevRecId BIGINT(20),
       TIMEDSTATUS,
       CANCELPUBTIME,
       ACTIONUSER
-    FROM v_wcm.wcmchnldoc
+    FROM trs_data_migration.wcmchnldoc
     ORDER BY RECID ASC ;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 3
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmdocument.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmdocument;
 DELIMITER $$
@@ -179,8 +179,7 @@ CREATE PROCEDURE p_data_migration_wcmdocument(IN prevDocId BIGINT(20),
       FromType,
       FromId,
       OriginDocId
-		FROM wcm.wcmdocument
-    where docid <= 1000
+		FROM trs_data_migration.wcmdocument
 		ORDER BY docid asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmfolderpublishconfig.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmfolderpublishconfig;
 DELIMITER $$
@@ -37,7 +37,7 @@ CREATE PROCEDURE p_data_migration_wcmfolderpublishconfig(IN prevFolderPublishCon
       ROOTDOMAIN,
       SITELANGUAGE,
       PAGEENCODING
-    FROM v_wcm.wcmfolderpublishconfig
+    FROM trs_data_migration.wcmfolderpublishconfig
 		ORDER BY FOLDERPUBLISHCONFIGID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmmetatable.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmmetatable;
 DELIMITER $$
@@ -18,7 +18,7 @@ CREATE PROCEDURE p_data_migration_wcmmetatable(IN prevTableInfoId VARCHAR(100),
       SELECT
         TABLEINFOID,
         TABLENAME
-      FROM v_wcm.xwcmtableinfo
+      FROM trs_data_migration.xwcmtableinfo
       ORDER BY TABLEINFOID asc;
 
     DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplate.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmtemplate;
 DELIMITER $$
@@ -55,7 +55,7 @@ CREATE PROCEDURE p_data_migration_wcmtemplate(IN prevTemplateId BIGINT(20),
       LASTMODIFIEDUSER,
       LASTMODIFIEDTIME,
       VISUAL
-    FROM v_wcm.wcmtemplate
+    FROM trs_data_migration.wcmtemplate
 		ORDER BY FOLDERPUBLISHCONFIGID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateargument.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmtemplateargument;
 DELIMITER $$
@@ -29,7 +29,7 @@ CREATE PROCEDURE p_data_migration_wcmtemplateargument(IN prevTemplateArgId BIGIN
       ARGUMENTNAME,
       ARGUMENTVALUE,
       PREFIXOFNAME
-    FROM v_wcm.wcmtemplateargument
+    FROM trs_data_migration.wcmtemplateargument
 		ORDER BY TEMPLATEARGUMENTID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplateemploy.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmtemplateemploy;
 DELIMITER $$
@@ -28,7 +28,7 @@ CREATE PROCEDURE p_data_migration_wcmtemplateemploy(IN prevTemplateEmployId BIGI
       TEMPLATEID,
       TEMPLATETYPE,
       ISDEFAULT
-    FROM v_wcm.wcmtemplateemploy
+    FROM trs_data_migration.wcmtemplateemploy
 		ORDER BY TEMPLATEEMPLOYID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatenest.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmtemplatenest;
 DELIMITER $$
@@ -18,7 +18,7 @@ CREATE PROCEDURE p_data_migration_wcmtemplatenest(IN prevTemplateNestId BIGINT(2
       TEMPLATEID,
       NESTEDTEMPLATEID,
       TEMPLATENESTID
-    FROM v_wcm.wcmtemplatenest
+    FROM trs_data_migration.wcmtemplatenest
 		ORDER BY TEMPLATENESTID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmtemplatequote.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmtemplatequote;
 DELIMITER $$
@@ -30,7 +30,7 @@ CREATE PROCEDURE p_data_migration_wcmtemplatequote(IN prevTemplateQuoteId BIGINT
       QUOTEDFOLDERID,
       FAMILYINDEX,
       QUOTETYPE
-    FROM v_wcm.wcmtemplatequote
+    FROM trs_data_migration.wcmtemplatequote
 		ORDER BY TEMPLATEQUOTEID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_wcmwebsite.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_wcmwebsite;
 DELIMITER $$
@@ -94,7 +94,7 @@ CREATE PROCEDURE p_data_migration_wcmwebsite(IN prevSiteId BIGINT(20), IN siteId
       SITEDESCPINYIN,
       IDXPREFIX,
       AUTOCHECK
-		FROM v_wcm.wcmwebsite
+		FROM trs_data_migration.wcmwebsite
 		ORDER BY siteid asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfo.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmclassinfo;
 DELIMITER $$
@@ -31,7 +31,7 @@ CREATE PROCEDURE p_data_migration_xwcmclassinfo(IN prevClassInfoId BIGINT(20),
       CRUSER,
       CRTIME,
       CCODE
-    FROM v_wcm.xwcmclassinfo
+    FROM trs_data_migration.xwcmclassinfo
 		ORDER BY CLASSINFOID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmclassinfoview.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmclassinfoview;
 DELIMITER $$
@@ -27,7 +27,7 @@ CREATE PROCEDURE p_data_migration_xwcmclassinfoview(IN prevClassInfoViewId BIGIN
       VIEWID,
       CRUSER,
       CRTIME
-    FROM v_wcm.xwcmclassinfoview
+    FROM trs_data_migration.xwcmclassinfoview
 		ORDER BY CLASSINFOVIEWID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmdbinfo.sql → TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmdbfieldinfo.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmdbfieldinfo;
 DELIMITER $$
@@ -54,7 +54,7 @@ CREATE PROCEDURE p_data_migration_xwcmdbfieldinfo(IN citySuffix VARCHAR(20),
       RADORCHK,
       NOTEDIT,
       HIDDENFIELD
-    FROM v_wcm.xwcmdbfieldinfo
+    FROM trs_data_migration.xwcmdbfieldinfo
 		ORDER BY DBFIELDINFOID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewemployer.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmmetaviewemployer;
 DELIMITER $$
@@ -27,7 +27,7 @@ CREATE PROCEDURE p_data_migration_xwcmmetaviewemployer(IN prevMetaViewEmployerId
       METAVIEWEMPLOYERID,
       EmployerType,
       EmployerId
-    FROM v_wcm.xwcmmetaviewemployer
+    FROM trs_data_migration.xwcmmetaviewemployer
 		ORDER BY METAVIEWEMPLOYERID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmmetaviewfieldgroup.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmmetaviewfieldgroup;
 DELIMITER $$
@@ -28,7 +28,7 @@ CREATE PROCEDURE p_data_migration_xwcmmetaviewfieldgroup(IN prevMetaViewFieldGro
       CRUSER,
       CRTIME,
       GROUPORDER
-    FROM v_wcm.xwcmmetaviewfieldgroup
+    FROM trs_data_migration.xwcmmetaviewfieldgroup
 		ORDER BY METAVIEWFIELDGROUPID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmtableinfo.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmtableinfo;
 DELIMITER $$
@@ -30,7 +30,7 @@ CREATE PROCEDURE p_data_migration_xwcmtableinfo(IN citySuffix VARCHAR(20),
       CRTIME,
       OWNERTYPE,
       OWNERID
-    FROM v_wcm.xwcmtableinfo
+    FROM trs_data_migration.xwcmtableinfo
 		ORDER BY TABLEINFOID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewfieldinfo.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmviewfieldinfo;
 DELIMITER $$
@@ -104,7 +104,7 @@ CREATE PROCEDURE p_data_migration_xwcmviewfieldinfo(IN citySuffix VARCHAR(20),
       FieldWidth,
       FieldClass,
       ISONLYSITE
-    FROM v_wcm.xwcmviewfieldinfo
+    FROM trs_data_migration.xwcmviewfieldinfo
 		ORDER BY VIEWFIELDINFOID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;

+ 2 - 2
TRS.WCM.Developer/贵州项目/sp/p_data_migration_xwcmviewinfo.sql

@@ -1,5 +1,5 @@
 
-use trs_hycloud_iip;
+use trs_data_migration;
 
 DROP PROCEDURE IF EXISTS p_data_migration_xwcmviewinfo;
 DELIMITER $$
@@ -53,7 +53,7 @@ CREATE PROCEDURE p_data_migration_xwcmviewinfo(IN citySuffix VARCHAR(20),
       HIDDENIMGAPPENDIX,
       HIDDENLINKAPPENDIX,
       Attribute
-    FROM v_wcm.xwcmviewinfo
+    FROM trs_data_migration.xwcmviewinfo
 		ORDER BY VIEWINFOID asc;
 
 	DECLARE CONTINUE HANDLER FOR NOT FOUND SET isover = 1;