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

Contents of /contributions/modules/contentblocker/contentblocker.install

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


Revision 1.2 - (show annotations) (download) (as text)
Tue Dec 9 21:05:41 2008 UTC (11 months, 2 weeks ago) by nedjo
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +39 -27 lines
File MIME type: text/x-php
Issue #342314, initial work toward D6 upgrade of contentblocker.
1 <?php
2 // $Id: contentblocker.install,v 1.1 2007/04/20 20:10:54 nedjo Exp $
3
4 /**
5 * Implementation of hook_schema().
6 */
7 function contentblocker_schema() {
8 $schema['contentblocker'] = array(
9 'description' => t('Items to be blocked (not displayed) for a given user.'),
10 'fields' => array(
11 'uid' => array(
12 'description' => t('The {users}.uid of a user.'),
13 'type' => 'int',
14 'not null' => TRUE,
15 ),
16 'id' => array(
17 'description' => t('The ID value of the item being blocked.'),
18 'type' => 'int',
19 'not null' => TRUE,
20 ),
21 'type' => array(
22 'description' => t('The object type of the item being blocked, e.g., user.'),
23 'type' => 'varchar',
24 'length' => 128,
25 'not null' => TRUE,
26 'default' => '',
27 ),
28 ),
29 'indexes' => array(
30 'uid' => array('uid'),
31 'id' => array('id'),
32 'block_type' => array(array('type', 4)),
33 ),
34 'primary key' => array('uid', 'id', 'type'),
35 );
36
37 return $schema;
38 }
39
40 /**
41 * Implementation of hook_install().
42 */
43 function contentblocker_install() {
44 // Create tables.
45 drupal_install_schema('contentblocker');
46 }

  ViewVC Help
Powered by ViewVC 1.1.2