function activity_update_6000 in Activity 6
In converting to Drupal 6 we should drop the use of the sequences table and instead use auto incrementing columns
File
- ./
activity.install, line 147 - Install file for activity module.
Code
function activity_update_6000() {
$ret = array();
db_drop_primary_key($ret, 'activity');
db_change_field($ret, 'activity', 'aid', 'aid_old', array(
'type' => 'int',
'not null' => TRUE,
));
db_add_field($ret, 'activity', 'aid', array(
'type' => 'serial',
'not null' => TRUE,
), array(
'primary key' => array(
'aid',
),
));
update_sql('UPDATE {activity} SET aid = aid_old');
db_drop_field($ret, 'activity', 'aid_old');
return $ret;
}