You are here

function token_custom_schema in Custom Tokens 6

Same name and namespace in other branches
  1. 7.2 token_custom.install \token_custom_schema()
  2. 7 token_custom.install \token_custom_schema()

Implementation of hook_schema(), new for Drupal 6

File

./token_custom.install, line 26
The install/uninstall code for the Token Custom module.

Code

function token_custom_schema() {
  $schema = array();
  $schema['token_custom'] = array(
    'description' => t('The database table for the Token Custom module.'),
    'fields' => array(
      'tkid' => array(
        'type' => 'serial',
        'size' => 'medium',
        'not null' => TRUE,
        'description' => t('tkid field description goes here.'),
      ),
      'id' => array(
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
        'description' => t('id field description goes here.'),
      ),
      'description' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => t('description field description goes here.'),
      ),
      'type' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => t('type field description goes here.'),
      ),
      'php' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
        'description' => t('php field description goes here.'),
      ),
    ),
    'primary key' => array(
      'tkid',
    ),
  );
  return $schema;
}