function flag_actions_update_6200 in Flag 7.2
Same name and namespace in other branches
- 6.2 flag_actions.install \flag_actions_update_6200()
- 7.3 flag_actions.install \flag_actions_update_6200()
Add a "repeat_threshold" value to all existing Flag actions.
File
- ./
flag_actions.install, line 79 - Flag actions install file.
Code
function flag_actions_update_6200() {
// Add the new repeat_threshold column.
if (!db_field_exists('flag_actions', 'repeat_threshold')) {
$column = array(
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
'disp-width' => '5',
);
db_add_field('flag_actions', 'repeat_threshold', $column);
}
// Update the normal threshold column to default to 0.
$column = array(
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
'disp-width' => '5',
);
db_change_field('flag_actions', 'threshold', 'threshold', $column);
}