function alchemy_schema in Alchemy 6
Same name and namespace in other branches
- 7 alchemy.install \alchemy_schema()
 
Implementation of hook_schema
File
- ./
alchemy.install, line 22  
Code
function alchemy_schema() {
  $schema['alchemy_cache'] = array(
    'description' => t('Creates database table to cache Alchemy data.'),
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The nid for the analyzed node.',
      ),
      //vid
      'path' => array(
        'type' => 'text',
        'description' => 'Path of the analyzed content',
      ),
      //path
      'created' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The unix time the recored was created.',
      ),
      //created
      'command' => array(
        'type' => 'text',
        'description' => 'Command request to Alchemy',
      ),
      //command
      'data' => array(
        'type' => 'text',
        'not null' => TRUE,
        //'default' => '',
        'description' => t('Cached data.'),
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'path' => array(
        array(
          'path',
          18,
        ),
      ),
    ),
  );
  return $schema;
}