/[drupal]/contributions/sandbox/alex_b/aggregator_node/aggregator_node.install
ViewVC logotype

Contents of /contributions/sandbox/alex_b/aggregator_node/aggregator_node.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Mon Dec 1 17:54:03 2008 UTC (11 months, 3 weeks ago) by alexb
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
Add node processor module for aggregator api (http://drupal.org/node/303930) to sandbox. This is a module for testing purposes.
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 }

  ViewVC Help
Powered by ViewVC 1.1.2