function recipe_update_6101 in Recipe 7.2
Same name and namespace in other branches
- 6 recipe.install \recipe_update_6101()
- 7 recipe.install \recipe_update_6101()
Adds aliases column to recipe_unit
File
- ./
recipe.install, line 243 - Install, update and uninstall functions for the recipe module.
Code
function recipe_update_6101() {
db_add_field('recipe_unit', 'aliases', array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
));
$units = _recipe_get_default_units();
foreach ($units as $u) {
db_update('recipe_unit')
->condition('name', $u['name'])
->fields(array(
'aliases' => $u['aliases'],
))
->execute();
}
}