I'm working on a content migration between a d7 and a d8 sites. I'm trying to use migration and I've a doubt: the d8 site is empty and every user, content, file, term will be filled with migration from the d7 installation.

Is it safe to migrate also ID (uid, nid, tid, fid) from d7 to d8? Or is better to migrate UUIDS and use them to match content relations?


The core migrations from D6/D7 to D8 do preserve IDs by default. But, it is fragile, you have to be careful not to create any content on the D8 side before you've completed all migration. Unless you depend on public-facing addresses (e.g., /node/[nid]), it's simpler to just allow IDs to be assigned on migration. See https://www.drupal.org/node/2748609#comment-11293627 for more.

  • Note that it's not just public-facing addresses, path aliases for example AFAIK also still require the same ID's or you need to do some mapping. – Berdir Dec 5 '16 at 16:11
  • I was thinking to create a callback to use uuid (migrated) to "match" reference entity (uid, fid, etc). – arrubiu Dec 7 '16 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.