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

Contents of /contributions/modules/term_display/term_display.install

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


Revision 1.4 - (show annotations) (download) (as text)
Sun Mar 15 17:36:29 2009 UTC (8 months, 2 weeks ago) by flanker
Branch: MAIN
Changes since 1.3: +13 -2 lines
File MIME type: text/x-php
#389730 Added uninstall hook.
1 <?php
2 // $Id: term_display.install,v 1.3 2008/09/07 14:45:18 nedjo Exp $
3
4
5 /**
6 * Implementation of hook_schema().
7 */
8 function term_display_schema() {
9 $schema['term_display'] = array(
10 'description' => t('Stores display styles for terms in node presentation by vocabulary.'),
11 'fields' => array(
12 'vid' => array(
13 'description' => t('The {vocabulary}.vid to be affected.'),
14 'type' => 'int',
15 'unsigned' => 1,
16 'not null' => TRUE,
17 'default' => 0,
18 ),
19 'style' => array(
20 'description' => t('The display style.'),
21 'type' => 'varchar',
22 'length' => 32,
23 'not null' => TRUE,
24 'default' => '',
25 ),
26 'weight' => array(
27 'description' => t('Weight of the element in the $node->content array. Lighter weights are higher up, heavier weights go down.'),
28 'type' => 'int',
29 'not null' => TRUE,
30 'default' => 0,
31 ),
32 ),
33 'primary key' => array('vid'),
34 );
35
36 return $schema;
37 }
38
39
40 /**
41 * Implementation of hook_install().
42 */
43 function term_display_install() {
44 // Create table.
45 drupal_install_schema('term_display');
46 }
47
48
49 /**
50 * Implementation of hook_uninstall().
51 */
52 function term_display_uninstall() {
53 // Remove table.
54 drupal_uninstall_schema('term_display');
55 }

  ViewVC Help
Powered by ViewVC 1.1.2