function block_attributes_install in Block Attributes 7
Implements hook_install().
File
- ./
block_attributes.install, line 11 - Install, update and uninstall functions for the block_attributes module.
Code
function block_attributes_install() {
$schema['block'] = array();
block_attributes_schema_alter($schema);
foreach ($schema['block']['fields'] as $field => $spec) {
if (db_field_exists('block', $field)) {
watchdog('system', 'Module install: Attempt to recreate field: "%field", when it already exists.', array(
'%field' => $field,
), WATCHDOG_WARNING);
}
else {
db_add_field('block', $field, $spec);
}
}
}