| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_install().
|
| 6 |
*/
|
| 7 |
function aggregator_node_install() {
|
| 8 |
// Create tables.
|
| 9 |
drupal_install_schema('aggregator_node');
|
| 10 |
}
|
| 11 |
|
| 12 |
/**
|
| 13 |
* Implementation of hook_uninstall().
|
| 14 |
*/
|
| 15 |
function aggregator_node_uninstall() {
|
| 16 |
// Remove tables.
|
| 17 |
drupal_uninstall_schema('aggregator_node');
|
| 18 |
}
|
| 19 |
|
| 20 |
/**
|
| 21 |
* Implementation of hook_schema().
|
| 22 |
*/
|
| 23 |
function aggregator_node_schema() {
|
| 24 |
$schema['aggregator_node'] = array(
|
| 25 |
'description' => 'Stores feed id, URL and GUID for feed item nodes.',
|
| 26 |
'fields' => array(
|
| 27 |
'nid' => array(
|
| 28 |
'type' => 'int',
|
| 29 |
'not null' => TRUE,
|
| 30 |
'description' => 'Primary key, maps an aggregator_node entry to its node.',
|
| 31 |
),
|
| 32 |
'fid' => array(
|
| 33 |
'type' => 'int',
|
| 34 |
'not null' => TRUE,
|
| 35 |
'description' => 'Feed id of this feed item.',
|
| 36 |
),
|
| 37 |
'link' => array(
|
| 38 |
'type' => 'text',
|
| 39 |
'description' => 'The feed item\'s URL.',
|
| 40 |
),
|
| 41 |
'guid' => array(
|
| 42 |
'type' => 'text',
|
| 43 |
'description' => 'The feed item\'s GUID.',
|
| 44 |
),
|
| 45 |
),
|
| 46 |
'primary key' => array('nid'),
|
| 47 |
'indexes' => array(
|
| 48 |
'fid' => array('fid'),
|
| 49 |
'link' => array('link(255)'),
|
| 50 |
'guid' => array('guid(255)'),
|
| 51 |
),
|
| 52 |
);
|
| 53 |
return $schema;
|
| 54 |
}
|