Skip to content

Commit e126552

Browse files
authored
Merge pull request #415 from sf-aastha-paruthi/u/aparuthi/migrationAfterAssessmentChanges
@W-19464591, @W-19616306 Assessment and Migration for Usecase2 (Standard data model)- Omniscript, Flexcard, IntegrationProcedures, DataMapper
2 parents 1831cf4 + 63a8c07 commit e126552

14 files changed

+2445
-287
lines changed

messages/assess.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,7 @@
195195
"ipNameUpdateFailed": "IP reference %s can’t be updated",
196196
"dmNameUpdateFailed": "DM reference %s can’t be updated",
197197
"invalidTypeAssessErrorMessage": "We couldn't assess your Omnistudio components in the %s namespace. Select the correct namespace and try again",
198-
"assessmentSuccessfulMessage": "Migration assessment for org %s is complete and reports are ready for review in the folder %s"
198+
"assessmentSuccessfulMessage": "Migration assessment for org %s is complete and reports are ready for review in the folder %s",
199+
"needManualInterventionAsSpecialCharsInChildFlexcardName": "Need manual intervention as child flexcards have special characters in their name",
200+
"needManualInterventionAsSpecialCharsInFlexcardName": "Need manual intervention as flexcard has special characters in name"
199201
}

messages/migrate.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@
245245
"generatedCustomLabelAssessmentReportPage": "Generated custom label assessment report page %s of %s with %s labels",
246246
"varDeclarationUpdated": "Variable initialization has been updated for target name",
247247
"migrationSuccessfulMessage": "Migration process for org %s is complete and reports are ready for review in the folder %s",
248+
"needManualInterventionAsSpecialCharsInChildFlexcardName": "Need manual intervention as child flexcards have special characters in their name",
249+
"needManualInterventionAsSpecialCharsInFlexcardName": "Need manual intervention as flexcard has special characters in name",
248250
"metadataTablesAlreadyClean": "OmniStudio metadata tables are empty",
249251
"startingMetadataCleanup": "Initiated cleanup process for Omnistudio metadata tables.",
250252
"failedToCleanTables": "Table cleanup failed: %s",

src/commands/omnistudio/migration/migrate.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,22 @@ export default class Migrate extends OmniStudioBaseCommand {
178178
// Migrate individual objects
179179
const debugTimer = DebugTimer.getInstance();
180180
// We need to truncate the standard objects first (in reverse order for cleanup)
181-
let objectMigrationResults = await this.truncateObjects([...migrationObjects].reverse(), debugTimer);
182-
const allTruncateComplete = objectMigrationResults.length === 0;
181+
let objectMigrationResults;
182+
const IS_STANDARD_DATA_MODEL = isStandardDataModel();
183183

184-
// Log truncation errors if any exist
185-
if (!allTruncateComplete) {
186-
this.logTruncationErrors(objectMigrationResults);
187-
return;
188-
}
184+
if (!IS_STANDARD_DATA_MODEL) {
185+
objectMigrationResults = await this.truncateObjects([...migrationObjects].reverse(), debugTimer);
186+
const allTruncateComplete = objectMigrationResults.length === 0;
189187

190-
if (allTruncateComplete) {
191-
objectMigrationResults = await this.migrateObjects(migrationObjects, debugTimer, namespace);
188+
// Log truncation errors if any exist
189+
if (!allTruncateComplete) {
190+
this.logTruncationErrors(objectMigrationResults);
191+
return;
192+
}
192193
}
193194

195+
objectMigrationResults = await this.migrateObjects(migrationObjects, debugTimer, namespace);
196+
194197
const omnistudioRelatedObjectsMigration = new OmnistudioRelatedObjectMigrationFacade(
195198
namespace,
196199
migrateOnly,

src/migration/dataraptor.ts

Lines changed: 140 additions & 72 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)