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

Diff of /contributions/modules/follow/follow.install

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

revision 1.1, Wed Apr 29 20:37:20 2009 UTC revision 1.2, Fri Oct 30 21:09:28 2009 UTC
# Line 0  Line 1 
1    <?php
2    // $Id: follow.install,v 1.1.2.1 2009/04/29 20:37:20 q0rban Exp $
3    
4    /**
5     * @file
6     *   Follow module's install and uninstall code.
7     */
8    
9    /**
10     * Implementation of hook_install().
11     */
12    function follow_install() {
13      drupal_install_schema('follow');
14    }
15    
16    /**
17     * Implementation of hook_schema().
18     */
19    function follow_schema() {
20      $schema['follow_links'] = array(
21        'description' => t('Stores sitewide and user follow links.'),
22        'fields' => array(
23          'lid' => array(
24            'type' => 'serial',
25            'unsigned' => TRUE,
26            'not null' => TRUE,
27            'description' => t('Unique identifier for the {follow_links}.'),
28          ),
29          'name' => array(
30            'type' => 'varchar',
31            'length' => 255,
32            'not null' => TRUE,
33            'default' => '',
34            'description' => t("The machine name of the {follow_links}."),
35          ),
36          'uid' => array(
37            'type' => 'int',
38            'not null' => TRUE,
39            'default' => 0,
40            'description' => "User's {users} uid.  Sitewide {follow_links} use uid 0",
41          ),
42          'url' => array(
43            'type' => 'varchar',
44            'length' => 255,
45            'not null' => TRUE,
46            'default' => '',
47            'description' => 'The url the {follow_links} should point to.',
48          ),
49          'weight' => array(
50            'type' => 'int',
51            'not null' => TRUE,
52            'default' => 0,
53            'size' => 'tiny',
54            'description' => t('The weight of this {follow_links}.'),
55          ),
56        ),
57        'primary key' => array('lid'),
58        'unique keys' => array(
59          'name_uid' => array('name', 'uid'),
60        ),
61      );
62      return $schema;
63    }
64    
65    /**
66     * Implementation of hook_uninstall().
67     */
68    function follow_uninstall() {
69      drupal_uninstall_schema('follow');
70      variable_del('follow_user_block_title');
71      variable_del('follow_site_block_title');
72      variable_del('follow_site_block_user');
73      cache_clear_all('follow:networks', 'cache');
74    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2