function scanner_schema in Search and Replace Scanner 7
Same name and namespace in other branches
- 8 scanner.install \scanner_schema()
- 6 scanner.install \scanner_schema()
Implements hook_schema().
File
- ./
scanner.install, line 11 - Search and Replace Scanner install scripts, etc.
Code
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;
}