function recipe_update_6101 in Recipe 6
Same name and namespace in other branches
- 7.2 recipe.install \recipe_update_6101()
- 7 recipe.install \recipe_update_6101()
Adds aliases column to recipe_unit
File
- ./
recipe.install, line 294 - Install, update and uninstall functions for the recipe module.
Code
function recipe_update_6101() {
$ret = array();
db_add_field($ret, 'recipe_unit', 'aliases', array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
));
$units = get_default_units();
foreach ($units as $u) {
db_query("UPDATE {recipe_unit} SET aliases = '%s' WHERE name='%s'", $u['aliases'], $u['name']);
}
return $ret;
}