Closed (fixed)
Project:
Migrate
Version:
7.x-2.1-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2009 at 14:12 UTC
Updated:
13 Jul 2011 at 23:55 UTC
Hi
First I would like to thank the devs and supporters of this project. Great work. Tried different approaches, but this seems to be the most feature-rich of them all.
I have a small issue when importing users from a php-fusion6_user_table into drupal - I simply cannot figure out how to keep the uid? ... Drupal automatically gives the imported users a new uid.
A small tip on how to keep the uid, would be a tremendous help, as I'm going a little brain-fried trying to accomplish this.
Thank you for your time.
Comments
Comment #1
moshe weitzman commentedI managed to get this feature into Drupal 7 core. For Drupal 6, you have to backport the patch at #303965: Enhanced data import - node_save() and user_save()
Comment #2
FAF commentedThank you for your reply, I will backport the patch and try to see how it turns out.
"I managed to get this feature into Drupal 7 core" - wow, nice. Really looks forward to test D7.
Thank you again.
Comment #4
koyama commentedFAF, can you say whether you were successful backporting the patch to Drupal 6?
I guess this step is critical to anyone who wants to migrate users and nodes into Drupal 6 when you want to preserve author information, right?
Comment #5
mikeryanThe patch Moshe points to is the one backported to Drupal 6 - we are using this successfully in our current project.
It is not necessary to preserve the IDs from the old system in order to preserve author information - migrating your users fills in a mapping of old IDs to Drupal uids, and you can incorporate this map into your node content set view so the correct uids are saved to the node records.
Comment #6
Fidelix commentedI need this on Drupal 7 because my site will be integrated with OpenAtrium and some external tools, which need the legacy UIDs to be preserved.
Please, can someone tell me how to achieve this?
Comment #7
Fidelix commentedPlease, help.
Can someone give me an example of how to do this?
Comment #8
bmacdonald commentedTake a look at or around lines 293-310 of the migrate example file `beer.inc` for a couple of suggestions for maintaining node identities between old and new systems. You can either map the `nid` to the old unique ID or you can specify a `sourceMigration` when you set up the relevant `addFieldMapping` method.
Comment #9
mikeryanPlease don't piggy-back on long-closed issues. New feature request opened at #1218244: Support is_new for users in D7 - in the meantime, just add