function advpoll_update_1 in Advanced Poll 5
Same name and namespace in other branches
- 6 advpoll.install \advpoll_update_1()
- 6.2 advpoll.install \advpoll_update_1()
Make sure that quorum has a default value of 0.
File
- ./
advpoll.install, line 118
Code
function advpoll_update_1() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
// This was fixed for new installs of pgsql, but not upgrades.
db_change_column($ret, 'advpoll', 'quorum', 'quorum', 'integer', array(
'not null' => TRUE,
'default' => 0,
));
break;
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {advpoll} CHANGE quorum quorum int(10) NOT NULL default '0'");
break;
}
return $ret;
}