function comment_upload_update_3 in Comment Upload 5
Same name and namespace in other branches
- 6 comment_upload.install \comment_upload_update_3()
Update column cid to be an unsigned int (MySQL only). Add index on nid.
File
- ./
comment_upload.install, line 90
Code
function comment_upload_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {comment_upload_files} CHANGE COLUMN cid cid int unsigned NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {comment_upload_files} ADD INDEX(nid)");
break;
}
return $ret;
}