function safeword_field_schema in Safeword 7
Same name and namespace in other branches
- 8 safeword.install \safeword_field_schema()
Implements hook_field_schema().
This defines the actual database schema of the field, using the format used by the Schema API.
The actual data we store here consists of two columns, one for the user visible string and another for the machine string.
See also
File
- ./
safeword.install, line 20 - Install/Update/Uninstall functions for safeword module
Code
function safeword_field_schema($field) {
$columns = array(
'human' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
'machine' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
);
$indexes = array(
'machine' => array(
'machine',
),
);
return array(
'columns' => $columns,
'indexes' => $indexes,
);
}