function block_tracker_schema_alter in Util 7
Same name and namespace in other branches
- 6.3 contribs/block_tracker/block_tracker.module \block_tracker_schema_alter()
Implements hook_schema_alter(). Add a last used timestamp to the blocks table.
File
- contribs/
block_tracker/ block_tracker.module, line 37 - Track block usage.
Code
function block_tracker_schema_alter(&$schema) {
if (isset($schema['block'])) {
$schema['block']['fields']['lastused'] = array(
'description' => 'The Unix timestamp when the node was last used.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
);
}
}