uSync Migrations - custom Nested Content migration
r

Rich G

about 1 year ago
Hey, Appreciate the fantastic uSync migrations project I've inherited a v8 project that has a custom implementation of a Nested Content datatype. From what I can tell there's not much difference to the original Nested Content datatype, but I don't know the history of the project. I've recreated the DocType with a standard Nested Content DataType so I can see how the data is different in preparation to use uSync migrations. The data structure is the same it seems, but new lines are handled differently. Custom Nested Content
<layout>
      <Value><![CDATA[[
  {
    "key": "f0a8df2b-f1f4-4a80-9c16-2b70a52216ae",
    "name": "Standard",
    "ncContentTypeAlias": "standard",
    "pageHeader": [
      {
        "key": "d7774230-5a6c-4415-b0e0-88193b4a379f",
        "name": "Hero",
        "ncContentTypeAlias": "hero",
        "title": "Hero Title Custom Nested Content",
        "subTitle": "Hero subTitle Custom Nested Content",
        "component": []
      }
    ],
    "display": [
      {
        "key": "c172bc9a-14e8-4a78-8567-7a4375bdf469",
        "name": "Html",
        "ncContentTypeAlias": "html",
        "text": "<p>Custom display</p>"
      }
    ]
  }
]]]></Value>
    </layout>
Standard Nested Content
<layout13>
      <Value><![CDATA[[
  {
    "key": "d2327547-8933-4803-ac84-a9c769326c60",
    "name": "Standard",
    "ncContentTypeAlias": "standard",
    "pageHeader": "[\r\n  {\r\n    \"key\": \"21275e98-78c6-4563-933f-4389bfeef470\",\r\n    \"name\": \"Hero\",\r\n    \"ncContentTypeAlias\": \"hero\",\r\n    \"title\": \"Hero Title Standard Nested Content\",\r\n    \"subTitle\": \"Hero subTitle Standard Nested Content\",\r\n    \"component\": []\r\n  }\r\n]",
    "display": "[\r\n  {\r\n    \"key\": \"e073dbe0-9d90-40e7-be69-a4a0141fe236\",\r\n    \"name\": \"Html\",\r\n    \"ncContentTypeAlias\": \"html\",\r\n    \"text\": \"<p>Standard display</p>\"\r\n  }\r\n]"
  }
]]]></Value>
    </layout13>
tbc.