function token_custom_schema in Custom Tokens 7
Same name and namespace in other branches
- 6 token_custom.install \token_custom_schema()
- 7.2 token_custom.install \token_custom_schema()
Implementation of hook_schema().
1 call to token_custom_schema()
- token_custom_update_7000 in ./
token_custom.install - Updates Custom Tokens name and type fields to allow storing 128 characters.
File
- ./
token_custom.install, line 22 - Install, update and uninstall functions for the token_custom module.
Code
function token_custom_schema() {
$schema = array();
$schema['token_custom'] = array(
'description' => 'The database table for the Token Custom module.',
'fields' => array(
'machine_name' => array(
'description' => 'The token\'s machine name',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'name' => array(
'description' => 'The token\'s human readable name',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
'description' => array(
'description' => 'The token\'s description, as shown on the token listings',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'type' => array(
'description' => 'The token\'s type, defining the context in which it will be available',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'php_content' => array(
'description' => 'The token\'s php content',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array(
'machine_name',
),
);
return $schema;
}