function userpoints_update_8 in User Points 5.3
Same name and namespace in other branches
- 6 userpoints.install \userpoints_update_8()
File
- ./
userpoints.install, line 198
Code
function userpoints_update_8() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {userpoints_txn} CHANGE tid tid INT(11) NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {userpoints} CHANGE tid tid INT(11) NOT NULL default '0'");
break;
case 'pgsql':
$ret[] = update_sql("ALTER TABLE {userpoints_txn} ALTER COLUMN tid TYPE INT(11) SET NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {userpoints} ALTER COLUMN tid TYPE INT(11) SET NOT NULL default '0'");
break;
}
return $ret;
}