|
|
@@ -2,12 +2,68 @@
|
|
|
pager cat >> /tmp/p_data_migration.log;
|
|
|
|
|
|
|
|
|
+# 支持断点续传,上一次迁移的最后一个 xx ID
|
|
|
+SET @prevSiteId = 0;
|
|
|
+SET @prevChannelId = 0;
|
|
|
+SET @prevRecId = 0;
|
|
|
SET @prevDocId = 0;
|
|
|
SET @prevChannelSynId = 0;
|
|
|
-SET @channelSynIdOffset = 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;
|
|
|
+
|
|
|
+# xx ID 偏移量,为了和海云系统中的 xx ID 错开一段距离
|
|
|
+SET @siteIdOffset = 0;
|
|
|
SET @channelIdOffset = 0;
|
|
|
+SET @channelSynIdOffset = 0;
|
|
|
+SET @templateIdOffset = 0;
|
|
|
+SET @recIdOffset = 0;
|
|
|
+SET @docIdOffset = 0;
|
|
|
+SET @viewIdOffset = 0;
|
|
|
+SET @folderPublishConfigIdOffset = 0;
|
|
|
+SET @templateArgIdOffset = 0;
|
|
|
+SET @templateEmployIdOffset = 0;
|
|
|
+SET @templateNestIdOffset = 0;
|
|
|
+SET @templateQuoteIdOffset = 0;
|
|
|
+SET @classInfoIdOffset = 0;
|
|
|
+SET @metaDataIdOffset = 0;
|
|
|
+SET @fieldIdOffset = 0;
|
|
|
+SET @classIdOffset = 0; #TODO
|
|
|
+SET @tableInfoIdOffset = 0;
|
|
|
+SET @metaViewEmployerIdOffset = 0;
|
|
|
+SET @viewFieldIdOffset = 0;
|
|
|
+SET @dbFieldIdOffset = 0;
|
|
|
+SET @fieldGroupIdOffset = 0;
|
|
|
|
|
|
-call p_data_migration_wcmdocument(@prevDocId);
|
|
|
+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_wcmmetatable('wcmmetatable', @prevDocId, @docIdOffset, @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, @siteIdOffset, @channelIdOffset);
|
|
|
+call p_data_migration_wcmtemplatenest(@prevTemplateNestId, @templateNestIdOffset);
|
|
|
+call p_data_migration_wcmtemplatequote(@prevTemplateQuoteId, @templateQuoteIdOffset, @siteIdOffset, @channelIdOffset);
|
|
|
+call p_data_migration_wcmwebsite(@prevSiteId, @siteIdOffset);
|
|
|
+call p_data_migration_xwcmclassinfo(@prevClassInfoId, @classInfoIdOffset);
|
|
|
+call p_data_migration_xwcmclassinfoview(@prevClassInfoViewId, @classInfoIdOffset, @metaDataIdOffset, @viewIdOffset);
|
|
|
+call p_data_migration_xwcmdbinfo(@prevFieldId, @fieldIdOffset, @classIdOffset, @tableInfoIdOffset);
|
|
|
+call p_data_migration_xwcmmetaviewemployer(@prevMetaViewEmployerId, @metaViewEmployerIdOffset, @channelIdOffset);
|
|
|
+call p_data_migration_xwcmtableinfo(@prevTableInfoId, @tableInfoIdOffset);
|
|
|
+call p_data_migration_xwcmviewfieldinfo(@prevViewFieldId, @viewFieldIdOffset, @tableInfoIdOffset, @classIdOffset, @dbFieldIdOffset, @fieldGroupIdOffset, @viewIdOffset, @viewIdOffset);
|
|
|
+call p_data_migration_xwcmviewinfo(@prevViewId, @viewIdOffset, @metaDataIdOffset);
|
|
|
|
|
|
nopager;
|