Migrating data in Drupal 5 to 6 using Table Wizard and Migrate (Part 2 - Users & Profiles)

Well, it looks like the users are pretty simple to do. Just overwrite the Drupal 6 profile_fields, profile_values, role, users, and users_roles tables with the Drupal 5 ones. No need to do any importing (which would have been pretty complicated with all the profile values in there).

Couple of things to watch for though:

  1. The users table now has uid as an auto-increment value, and the default value is None, instead of 0. So update those settings. You may have to set user 0 to a very high number first, and then reset it to 0 afterwards. If you do that, reset the next auto-increment value to the next highest number again.
  2. You also need to add in a signature_format field, just after the signature field. Check the settings for the field from any Drupal 6 install.
  3. There is also a new timezone_name field at the end of the users table. However, this only gets added by the Date module, so if you're not using that module, don't worry about it.
  4. You need to change the settings for the name field in the profile_fields table so that NULL is not allowed and the default is blank.
  5. For the profile_values table, I could not make uid and fid primary keys, so I simply exported the tables with phpMyAdmin and imported them into the drupal6 table.
  6. In the users_roles table, add an index to the rid field.
Posted in:
magnanimous-junior