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

Contents of /contributions/modules/subuser/subuser.install

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Apr 24 02:06:43 2009 UTC (7 months ago) by boombatower
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-1, DRUPAL-6--1-2, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +52 -25 lines
File MIME type: text/x-php
Initial stable code.
1 <?php
2 // $Id$
3 /**
4 * @file
5 * Provides database schema and uninstall cleanup.
6 *
7 * Copyright 2008-2009 by Jimmy Berry ("boombatower", http://drupal.org/user/214218)
8 */
9
10 /**
11 * Implementation of hook_schema().
12 */
13 function subuser_schema() {
14 $schema['user_relationship'] = array(
15 'description' => t('Holds user relationship associations.'),
16 'fields' => array(
17 'rid' => array(
18 'type' => 'serial',
19 'description' => t('The unique relationship identifier.'),
20 'unsigned' => TRUE,
21 'not null' => TRUE,
22 ),
23 'parent_id' => array(
24 'description' => t('The parent user identifier.'),
25 'type' => 'int',
26 'unsigned' => TRUE,
27 'not null' => TRUE,
28 ),
29 'uid' => array(
30 'description' => t('The primary user identifier.'),
31 'type' => 'int',
32 'unsigned' => TRUE,
33 'not null' => TRUE,
34 ),
35 ),
36 'indexes' => array(
37 'uid' => array('uid'),
38 'parent_id' => array('parent_id'),
39 ),
40 'primary key' => array('rid'),
41 );
42 return $schema;
43 }
44
45 /**
46 * Implementation of hook_install().
47 */
48 function subuser_install() {
49 drupal_install_schema('subuser');
50 }
51
52 /**
53 * Implementation of hook_uninstall().
54 */
55 function subuser_uninstall() {
56 drupal_uninstall_schema('subuser');
57
58 variable_del('subuser_roles');
59 }

  ViewVC Help
Powered by ViewVC 1.1.2