function signup_update_3 in Signup 5.2
Same name and namespace in other branches
- 5 signup.install \signup_update_3()
- 6.2 signup.install \signup_update_3()
- 6 signup.install \signup_update_3()
File
- ./
signup.install, line 136
Code
function signup_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {signup_log} ADD anon_mail VARCHAR( 255 ) NOT NULL default '' AFTER nid;");
$ret[] = update_sql("ALTER TABLE {signup_log} DROP INDEX uid_nid;");
$ret[] = update_sql("ALTER TABLE {signup_log} ADD INDEX (uid);");
$ret[] = update_sql("ALTER TABLE {signup_log} ADD INDEX (nid);");
break;
case 'pgsql':
db_add_column($ret, 'signup_log', 'anon_mail', 'text', array(
'not null' => TRUE,
'default' => "''",
));
$ret[] = update_sql("DROP INDEX {signup_log}_uid_nid_idx;");
$ret[] = update_sql("CREATE INDEX {signup_log}_uid_idx ON {signup_log}(uid);");
$ret[] = update_sql("CREATE INDEX {signup_log}_nid_idx ON {signup_log}(nid);");
break;
}
return $ret;
}