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

Contents of /contributions/modules/userlink/userlink.install

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


Revision 1.5 - (show annotations) (download) (as text)
Mon Feb 23 19:30:49 2009 UTC (9 months ago) by marcp
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
Changes since 1.4: +13 -6 lines
File MIME type: text/x-php
Cleaned up the install and provided hook_uninstall().
1 <?php
2 // $Id: userlink.install,v 1.2 2007/01/27 22:23:35 marcp Exp $
3
4 /*
5 * @file
6 * userlink install file.
7 */
8
9 /**
10 * Implementation of hook_schema().
11 */
12 function userlink_schema() {
13 $schema['userlink'] = array(
14 'description' => t('Stores userlink (or bookmark) information.'),
15 'fields' => array(
16 'nid' => array(
17 'description' => t("The userlink's {node}.nid."),
18 'type' => 'int',
19 'unsigned' => 1,
20 'not null' => TRUE,
21 'default' => 0,
22 ),
23 'vid' => array(
24 'description' => t("The userlink's {node_revisions}.vid version identifier."),
25 'type' => 'int',
26 'unsigned' => 1,
27 'not null' => TRUE,
28 'default' => 0,
29 ),
30 'url' => array(
31 'description' => t('The URL of the userlink.'),
32 'type' => 'varchar',
33 'length' => 255,
34 'not null' => TRUE,
35 'default' => '',
36 ),
37 'private' => array(
38 'description' => t('In the future this will hold a privacy flag.'),
39 'type' => 'int',
40 'not null' => TRUE,
41 'default' => 0,
42 ),
43 ),
44 'primary key' => array('nid', 'vid'),
45 );
46
47 return $schema;
48 }
49
50 /**
51 * Implementation of hook_install().
52 */
53 function userlink_install() {
54 // Create tables.
55 drupal_install_schema('userlink');
56
57 drupal_set_message(t('Userlink has created the required tables.'));
58 }
59
60 /**
61 * Implementation of hook_uninstall().
62 */
63 function userlink_uninstall() {
64 drupal_uninstall_schema('userlink');
65 }

  ViewVC Help
Powered by ViewVC 1.1.2