Index: imagecache.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imagecache/imagecache.install,v retrieving revision 1.22 diff -u -p -r1.22 imagecache.install --- imagecache.install 22 Dec 2008 00:01:19 -0000 1.22 +++ imagecache.install 22 Dec 2008 21:35:01 -0000 @@ -244,3 +244,23 @@ function imagecache_update_5() { return array(); } + +/** + * Upgrade from Drupal 5 => Drupal 6. + * Add the module field to imagecache_action + */ +function imagecache_update_6000() { + $ret = array(); + + // update primary keys to serial type for Drupal 6 + $tables = array( + 'imagecache_preset' => 'presetid', + 'imagecache_action' => 'actionid', + ); + foreach ($tables as $table => $field) { + db_drop_primary_key($ret, $table); + db_change_field($ret, $table, $field, $field, array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array($field))); + } + + return $ret; +}