Hey @chibu,
This might help: Migrating to Prismic - Documentation - Prismic ![]()
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:
- Create a mapping between old and new document IDs.
- When you migrate each document, save its original Prismic ID (
uidor oldid) along with the new ID generated in the target repo. - This can be stored in a simple
Map<string, string>(oldId → newId).
- During the migration of related documents:
- Replace the old IDs in the
relatedfield 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.
- 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
relatedwith the correct new document references.