Download & Extend

Upgrade from 5 to 6 does not work properly

Project:LDAP integration
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

After upgrading from Drupal 5 to 6, my ldapgroup settings disappeared. I found this to be because the Drupal 5 version of the module uses slightly different names for the settings than the Drupal 6 version and no module update correctly alters the database. For example, in Drupal 5 the LDAP group entries value is stored in the column ldap_group_entries, while in the Drupal 6 version it is stored in ldapgroups_entries. There should be a module update that checks for the presence of the old column and renames it if it exists.

Comments

#1

Priority:normal» major
Status:active» needs review

I have done some work on this and am posting my results. Attached is a patch with a new module update, 6002, that attempts to migrate columns from the D5 names and format to D6. In addition to different column names, I found that the D6 version of the module serializes multi-line values, whereas the D5 version stored raw text in the database. I have tried to make the update as smart as possible to wind up with a good working configuration at the end. For the fields in question, it checks to see if the old column exists, if so it uses db_change_field() to change the column name and type (This fixes [#3932442] for users upgrading from D5.) It next checks if the field has any newline characters and if so creates an array, serializes it and updates the database with the serialized value.

If the old column did not exist, the module checks to see if the new one already exists. If it does not, the module creates column using the new schema. If the new column already exists a message is displayed to the user. I'm not sure if it's even possible to wind up here, but I want to ensure that the schema is 100% correct by the end of the updates and the user doesn't see any errors whether they are actual problems or not.

I have ran updates several times using the attached patch and my LDAP config come through flawlessly, but I haven't tested all the various config options as I don't have time. I hope this helps smooth out D5->D6 upgrades for others and makes it's way into the module soon.

AttachmentSize
ldapgroups_update.patch 2.98 KB

#2

Status:needs review» closed (won't fix)

Marking this as won't fix, since 5 is dead and this is old, Re-open is you think it's still needed.

nobody click here