Upgrade path from drupal.module to site_network.module (example code)

Gábor Hojtsy - October 9, 2007 - 16:23
Project:Site Network
Version:6.x-1.0
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

For people to be able to migrate from drupal.module to site_network, site_network module should have an update function. site_network_update_1() already covers variables, but the authmap table should also be updated to inform Drupal that site_network handles the previously drupal.module managed authentication. Sample code:

UPDATE {authmap} SET module = 'site_network' WHERE module = 'drupal';

From looking around the code I think this should be enough.

#1

brmassa - July 30, 2008 - 22:23
Status:active» fixed

Guys,

fixed on CVS.

regards,

massa

#2

andypost - August 12, 2008 - 17:24
Version:» 6.x-1.0
Status:fixed» postponed

I'm tried this and suppose there's error site_network_update_6001 is not running on main update maybe because number 6001 not 6000.
To work it properly I start update.php and choose 6001 update against site_network module.

#3

brmassa - August 12, 2008 - 22:46
Status:postponed» fixed

Andrey,

its not working but its not the reason. the problem is that site_network_update_6000 is an update for module Site Network, not the old Drupal module. So i need to rename it to drupal_update_6000 or even better: exclude it and include them inside the hook_install.

i will fix it on CVS.

regards,

massa

#4

andypost - August 12, 2008 - 23:43

Suppose better to rename it to _6000 or _1 because there's no previous vesions
install should perform only install actions and update search for old configs and other

#5

Anonymous (not verified) - August 26, 2008 - 23:44
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.