|
|
@@ -36,34 +36,50 @@ CREATE PROCEDURE sp_city_n(IN n INT)
|
|
|
|
|
|
|
|
|
|
|
|
- # xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
|
|
|
- SET @siteIdOffset = 100000 * @n;
|
|
|
- SET @viewIdOffset = 100000 * @n;
|
|
|
- SET @tableInfoIdOffset = 100000 * @n;
|
|
|
- SET @metaViewFieldGroupIdOffset = 100000 * @n;
|
|
|
-
|
|
|
- SET @classInfoViewIdOffset = 100000 * @n;
|
|
|
- SET @classInfoIdOffset = 100000 * @n;
|
|
|
- SET @fieldIdOffset = 1000000 * @n;
|
|
|
- SET @metaViewEmployerIdOffset = 100000 * @n;
|
|
|
- SET @viewFieldInfoIdOffset = 100000 * @n;
|
|
|
- SET @dbFieldIdOffset = 100000 * @n;
|
|
|
-
|
|
|
- SET @channelIdOffset = 1000000 * @n;
|
|
|
- SET @channelSynIdOffset = 1000000 * @n;
|
|
|
- SET @templateIdOffset = 1000000 * @n;
|
|
|
- SET @folderPublishConfigIdOffset = 1000000 * @n;
|
|
|
- SET @templateArgIdOffset = 1000000 * @n;
|
|
|
- SET @templateEmployIdOffset = 1000000 * @n;
|
|
|
- SET @templateNestIdOffset = 1000000 * @n;
|
|
|
- SET @templateQuoteIdOffset = 1000000 * @n;
|
|
|
-
|
|
|
- SET @appendixIdOffset = 10000000 * @n;
|
|
|
- SET @recIdOffset = 10000000 * @n;
|
|
|
- SET @docIdOffset = 10000000 * @n;
|
|
|
-
|
|
|
-
|
|
|
|
|
|
+ # xx ID 偏移量,获取海云系统中的对应 xx maxID 错开一段距离,改为存入最大id
|
|
|
+ SET @siteIdOffset= IFNULL((SELECT MAX(siteId) from trs_hycloud_iip.wcmwebsite),0);
|
|
|
+ CALL setOffset('wcmwebsite',@siteIdOffset);
|
|
|
+ SET @chnlIdOffset= IFNULL((SELECT MAX(channelId) from trs_hycloud_iip.wcmchannel),0);
|
|
|
+ CALL setOffset('wcmchannel',@chnlIdOffset);
|
|
|
+ SET @appendixIdOffset= IFNULL((SELECT MAX(appendixId) from trs_hycloud_iip.wcmappendix),0);
|
|
|
+ CALL setOffset('wcmappendix',@appendixIdOffset);
|
|
|
+ SET @recIdOffset= IFNULL((SELECT MAX(recId) from trs_hycloud_iip.wcmchnldoc),0);
|
|
|
+ CALL setOffset('wcmchnldoc',@recIdOffset);
|
|
|
+ SET @docIdOffset= IFNULL((SELECT MAX(documentId) from trs_hycloud_iip.wcmdocument),0);
|
|
|
+ CALL setOffset('wcmdocument',@docIdOffset);
|
|
|
+ SET @viewIdOffset= IFNULL((SELECT MAX(viewInfoId) from trs_hycloud_iip.xwcmviewinfo),0);
|
|
|
+ CALL setOffset('xwcmviewinfo',@viewIdOffset);
|
|
|
+ SET @tableInfoIdOffset= IFNULL((SELECT MAX(TABLEINFOID) from trs_hycloud_iip.xwcmtableinfo),0);
|
|
|
+ CALL setOffset('xwcmtableinfo',@tableInfoIdOffset);
|
|
|
+ SET @fieldIdOffset= IFNULL((SELECT MAX(dbFieldId) from trs_hycloud_iip.xwcmdbfieldinfo),0);
|
|
|
+ CALL setOffset('xwcmdbfieldinfo',@fieldIdOffset);
|
|
|
+ SET @channelSynIdOffset= IFNULL((SELECT MAX(channelSynId) from trs_hycloud_iip.wcmchannelsyn),0);
|
|
|
+ CALL setOffset('wcmchannelsyn',@channelSynIdOffset);
|
|
|
+ SET @templateIdOffset= IFNULL((SELECT MAX(templateId) from trs_hycloud_iip.wcmtemplate),0);
|
|
|
+ CALL setOffset('wcmtemplate',@templateIdOffset);
|
|
|
+ SET @folderPublishConfigIdOffset= IFNULL((SELECT MAX(folderPublishConfigId) from trs_hycloud_iip.wcmfolderpublishconfig),0);
|
|
|
+ CALL setOffset('wcmfolderpublishconfig',@folderPublishConfigIdOffset);
|
|
|
+ SET @templateEmployIdOffset= IFNULL((SELECT MAX(templateEmployId) from trs_hycloud_iip.wcmtemplateemploy),0);
|
|
|
+ CALL setOffset('wcmtemplateemploy',@templateEmployIdOffset);
|
|
|
+ SET @templateNestIdOffset= IFNULL((SELECT MAX(templateNestId) from trs_hycloud_iip.wcmtemplatenest),0);
|
|
|
+ CALL setOffset('wcmtemplatenest',@templateNestIdOffset);
|
|
|
+ SET @templateQuoteIdOffset= IFNULL((SELECT MAX(templateQuoteId) from trs_hycloud_iip.wcmtemplatequote),0);
|
|
|
+ CALL setOffset('wcmtemplatequote',@templateQuoteIdOffset);
|
|
|
+
|
|
|
+ SET @metaViewEmployerIdOffset= IFNULL((SELECT MAX(metaViewEmployerId) from trs_hycloud_iip.xwcmmetaviewemployer),0);
|
|
|
+ CALL setOffset('xwcmmetaviewemployer',@metaViewEmployerIdOffset);
|
|
|
+ SET @viewFieldInfoIdOffset= IFNULL((SELECT MAX(viewfieldinfoId) from trs_hycloud_iip.xwcmviewfieldinfo),0);
|
|
|
+ CALL setOffset('xwcmviewfieldinfo',@viewFieldInfoIdOffset);
|
|
|
+ SET @templateArgIdOffset= IFNULL((SELECT MAX(TEMPLATEARGUMENTID) from trs_hycloud_iip.wcmtemplateargument),0);
|
|
|
+ CALL setOffset('wcmtemplateargument',@templateArgIdOffset);
|
|
|
+ SET @classInfoIdOffset= IFNULL((SELECT MAX(classInfoId) from trs_hycloud_iip.xwcmclassinfo),0);
|
|
|
+ CALL setOffset('xwcmclassinfo',@classInfoIdOffset);
|
|
|
+ SET @classInfoViewIdOffset= IFNULL((SELECT MAX(classInfoViewId) from trs_hycloud_iip.xwcmclassinfoview),0);
|
|
|
+ CALL setOffset('xwcmclassinfoview',@classInfoViewIdOffset);
|
|
|
+ # xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离(原)
|
|
|
+ #字段分组不用迁移,旧环境分组无法复用
|
|
|
+ SET @metaViewFieldGroupIdOffset = 100000 * @n;
|
|
|
|
|
|
call sp_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
|
|
|
call sp_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
|
|
|
@@ -89,7 +105,7 @@ CREATE PROCEDURE sp_city_n(IN n INT)
|
|
|
call sp_data_migration_wcmmetatable(@citySuffix, @prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
|
|
|
|
|
|
|
|
|
-
|
|
|
+ # 待优化
|
|
|
# 迁移 MAS 视频,6个wcm节点的视频是在一起的。可重复执行。
|
|
|
|
|
|
# 支持断点续传,上一次迁移的最后一个 xx ID
|