|
|
@@ -1,10 +1,9 @@
|
|
|
USE trs_data_migration;
|
|
|
|
|
|
-SET GLOBAL log_bin_trust_function_creators = TRUE;
|
|
|
-DROP FUNCTION IF EXISTS data_migration_function;
|
|
|
+DROP PROCEDURE IF EXISTS sp_city_n;
|
|
|
DELIMITER $$
|
|
|
-CREATE FUNCTION data_migration_function(n INT)
|
|
|
- RETURNS VARCHAR(255)
|
|
|
+CREATE PROCEDURE sp_city_n(IN n INT)
|
|
|
+
|
|
|
BEGIN
|
|
|
|
|
|
# 每迁移一个wcm节点,@n 必须 +1
|
|
|
@@ -62,30 +61,30 @@ CREATE FUNCTION data_migration_function(n INT)
|
|
|
|
|
|
|
|
|
|
|
|
- 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);
|
|
|
+ call sp_data_migration_wcmappendix(@prevAppendixId, @appendixIdOffset, @docIdOffset);
|
|
|
+ call sp_data_migration_wcmchannel(@prevChannelId, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmchannelchildindexquote(@templateIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmchannelsyn(@prevChannelSynId, @channelSynIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmchnldoc(@prevRecId, @recIdOffset, @prevDocId, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmdocument(@prevDocId, @prevDocId, @viewIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmfolderpublishconfig(@prevFolderPublishConfigId, @folderPublishConfigIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmtemplate(@prevTemplateId, @templateIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmtemplateargument(@prevTemplateArgId, @templateArgIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmtemplateemploy(@prevTemplateEmployId, @templateEmployIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
|
|
|
+ call sp_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @templateIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
|
|
|
+ call sp_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
|
|
|
+ call sp_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @docIdOffset, @viewIdOffset);
|
|
|
+ call sp_data_migration_xwcmdbinfo(@citySuffix, @prevFieldId, @fieldIdOffset, @prevClassInfoId, @tableInfoIdOffset);
|
|
|
+ call sp_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
|
|
|
+ call sp_data_migration_xwcmmetaviewfieldgroup(@prevMetaViewFieldGroupId, @metaViewFieldGroupIdOffset, @viewIdOffset);
|
|
|
+ call sp_data_migration_xwcmtableinfo(@citySuffix, @prevTableInfoId, @tableInfoIdOffset);
|
|
|
+ call sp_data_migration_xwcmviewfieldinfo(@citySuffix, @prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @prevClassInfoId, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
|
|
|
+ call sp_data_migration_xwcmviewinfo(@citySuffix, @prevViewId, @viewIdOffset, @mainTableIdOffset);
|
|
|
+ call sp_data_migration_wcmmetatable(@prevTableInfoId, @prevDocId, @docIdOffset, @channelIdOffset);
|
|
|
|
|
|
|
|
|
|
|
|
- RETURN 'OK';
|
|
|
END $$
|
|
|
+DELIMITER ;
|