"Hyperlink span must contain a 'data' field with link data"

Hey @chibu,

This might help: Migrating to Prismic - Documentation - Prismic :slight_smile:

You do have to update relationships, as indeed these documents won't be automatically updated. During the migration process, you need to manually map old/new documents.

Here's the general approach:

  1. Create a mapping between old and new document IDs.
  • When you migrate each document, save its original Prismic ID (uid or old id) along with the new ID generated in the target repo.
  • This can be stored in a simple Map<string, string> (oldId → newId).
  1. During the migration of related documents:
  • Replace the old IDs in the related field with the new ones from your mapping.
  • If the related document hasn’t been migrated yet, skip or mark it temporarily and backfill later once it has been.
  1. If you migrate in batches, do a second pass to backfill relationships.
  • Once all documents are migrated and you have a complete mapping, you can run a second migration script that updates related with the correct new document references.