You are here

function alchemy_schema in Alchemy 7

Same name and namespace in other branches
  1. 6 alchemy.install \alchemy_schema()

Implements hook_schema().

File

./alchemy.install, line 28
Install, update and uninstall functions for the alchemy module.

Code

function alchemy_schema() {
  $schema['alchemy_cache'] = array(
    'description' => '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.',
      ),
      'path' => array(
        'type' => 'text',
        'description' => 'Path of the analyzed content',
      ),
      'created' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The unix time the recored was created.',
      ),
      'command' => array(
        'type' => 'text',
        'description' => 'Command request to Alchemy',
      ),
      'data' => array(
        'type' => 'text',
        'not null' => TRUE,
        // 'default' => '',
        'description' => 'Cached data.',
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'path' => array(
        array(
          'path',
          18,
        ),
      ),
    ),
  );
  return $schema;
}