Complex scenarios: Migrating tables with a chain of references

In this scenario, there is one primary table to be migrated (MACHINE) and one referenced table (LOCATION) that in turn references another table (COUNTRY). This chain of references makes this a more complex scenario to migrate. This topic contains some examples using this scenario.

In examples 1 to 4 in this section, source values are used where the entire chain was exported:


MACHINE1 Machine -> LOCATION2 Location -> COUNTRY3 Country

Machine:   MACHINE1
Location:  LOCATION2
Country:   COUNTRY3

Example 1: No primary and referenced values in the target.

All data was correctly imported. Rollback is successful and all values are rolled back.

Example 2: No primary value for MACHINE1, but LOCATION2 and COUNTRY3 values exist on target

Only the primary table value is imported. Rollback is successful. Rollback only rolls back the imported value

Note: If you add a dependency on the LOCATION2 value for another primary row in the target, even then the rollback is successful.

Example 3: No primary value for MACHINE1 and LOCATION2 in target, but COUNTRY3 exists on target

Only LOCATION2 and a primary value of MACHINE1 are imported. Rollback is also successful. Only the values that were imported are rolled back.

Example 4: No primary value of MACHINE1 or COUNTRY3, but LOCATION2 exists on target

Note: LOCATION2 refers to other Country data. In this case, the value OTHER for Country.

In this case, the primary value is imported, LOCATION2 is updated and COUNTRY3 is imported. Rollback is successful. Imported values are rolled back , the LOCATION2 referenced value is updated to the original value of OTHER

Example 5: Primary value of MACHINE1 in the target, but LOCATION2 does not exist in the source

In this example there is a nullable reference in the source and it does not exist in target. LOCATION2 and COUNTRY3 do not exist in target.

Source Machine: MACHINE1 with description MachineDescription

Target Machine: MACHINE1 with no description

In this case, only the description was updated. No references were imported as they do not exist in the source and import file. Rollback successfully reverts the description back to its original value.