/[drupal]/contributions/modules/morelikethis/morelikethis.install
ViewVC logotype

Contents of /contributions/modules/morelikethis/morelikethis.install

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


Revision 1.1 - (show annotations) (download) (as text)
Fri Oct 3 16:36:58 2008 UTC (13 months, 3 weeks ago) by febbraro
Branch: MAIN
CVS Tags: DRUPAL-6--0-9, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
initial commit of new module
1 <?php
2 /*
3 Copyright (C) 2008 by Phase2 Technology.
4 Author(s): Frank Febbraro
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY. See the LICENSE.txt file for more details.
10
11 $Id$
12 */
13 /**
14 * @file
15 */
16
17 /**
18 * Implementation of hook_uninstall().
19 */
20 function morelikethis_uninstall() {
21 drupal_uninstall_schema('morelikethis');
22
23 db_query("DELETE FROM {variable} WHERE name like 'morelikethis_%'");
24 }
25
26 /**
27 * Implementation of hook_install().
28 */
29 function morelikethis_install() {
30 drupal_install_schema('morelikethis');
31
32 // Module weights: put after something like calais (which is 10)
33 db_query("UPDATE {system} SET weight = 15 WHERE name = 'morelikethis'");
34 }
35
36 /**
37 * Implementation of hook_schema().
38 */
39 function morelikethis_schema() {
40
41 $schema['morelikethis'] = array(
42 'description' => 'Data associated with Calais Geomapping for nodes',
43 'fields' => array(
44 'vid' => array(
45 'type' => 'int',
46 'unsigned' => TRUE,
47 'not null' => TRUE,
48 'default' => 0,
49 'description' => t('The node revision id')
50 ),
51 'nid' => array(
52 'type' => 'int',
53 'unsigned' => TRUE,
54 'not null' => TRUE,
55 'default' => 0,
56 'description' => t('The node id')
57 ),
58 'term' => array(
59 'type' => 'varchar',
60 'length' => 255,
61 'description' => t('The term to add to their lookup')
62 ),
63 ),
64 'indexes' => array(
65 'nid' => array('nid'),
66 'vid' => array('vid'),
67 ),
68 );
69
70 return $schema;
71 }

  ViewVC Help
Powered by ViewVC 1.1.2