scanner.install in Search and Replace Scanner 7
Same filename and directory in other branches
Search and Replace Scanner install scripts, etc.
File
scanner.installView source
<?php
/**
* @file
* Search and Replace Scanner install scripts, etc.
*/
/**
* Implements hook_schema().
*/
function scanner_schema() {
$schema['scanner'] = array(
'description' => 'Holds info on recent replacements in case undo is needed.',
'fields' => array(
'undo_id' => array(
'description' => 'Row identifier',
'type' => 'serial',
'not null' => TRUE,
),
'undo_data' => array(
'description' => 'What was changed',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'undone' => array(
'description' => 'Whether the replacement has been undone',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
'searched' => array(
'description' => 'Text that was searched for',
'type' => 'varchar',
'length' => 256,
'not null' => TRUE,
),
'replaced' => array(
'description' => 'Text that was used as replacement',
'type' => 'varchar',
'length' => 256,
'not null' => TRUE,
),
'count' => array(
'description' => 'How many fields were modified on replacement',
'type' => 'int',
'not null' => TRUE,
),
'time' => array(
'description' => 'How long the replacement took',
'type' => 'int',
'not null' => TRUE,
),
),
'primary key' => array(
'undo_id',
),
);
return $schema;
}
/**
* Rebuild the menu cache.
*/
function scanner_update_7100() {
variable_set('menu_rebuild_needed', TRUE);
}
Functions
Name | Description |
---|---|
scanner_schema | Implements hook_schema(). |
scanner_update_7100 | Rebuild the menu cache. |