View source
<?php
function alchemy_install() {
drupal_install_schema('alchemy');
drupal_set_message(t('Alchemy has been installed.'));
}
function alchemy_uninstall() {
drupal_uninstall_schema('alchemy');
drupal_set_message(t('Alchemy has been uninstalled.'));
}
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.',
),
'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,
'description' => t('Cached data.'),
),
),
'indexes' => array(
'nid' => array(
'nid',
),
'path' => array(
array(
'path',
18,
),
),
),
);
return $schema;
}