function forum_access_update_2 in Forum Access 5
Same name and namespace in other branches
- 6 forum_access.install \forum_access_update_2()
Add a priority column (will probably not be used until D6).
File
- ./
forum_access.install, line 55
Code
function forum_access_update_2() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
db_add_column($ret, 'forum_access', 'priority', 'smallint', array(
'not null' => TRUE,
'default' => 0,
));
break;
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {forum_access} ADD COLUMN priority smallint NOT NULL DEFAULT 0");
break;
}
return $ret;
}