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

Contents of /contributions/modules/handler/handler.install

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


Revision 1.2 - (show annotations) (download) (as text)
Mon Oct 27 00:45:37 2008 UTC (12 months, 4 weeks ago) by crell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +23 -16 lines
File MIME type: text/x-php
- Updated schema for name changes, and preparing for the new lookup mechanism.
1 <?php
2 // $Id: handler.install,v 1.1 2008/08/11 03:54:09 crell Exp $
3
4 /**
5 * Implementation of hook_install();
6 */
7 function handler_install() {
8 drupal_install_schema('handler');
9 }
10
11 /**
12 * Implementation of hook_schema().
13 */
14 function handler_schema() {
15
16 $schema = array();
17
18 $schema['handler_slot_info'] = array(
19 'fields' => array(
20 'slot' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
21 'title' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
22 'interface' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
23 'factory' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
24 'default_handler' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
25 'targets' => array('type' => 'text', 'not null' => TRUE),
26 'description' => array('type' => 'text', 'not null' => TRUE)),
27 'primary key' => array('slot'),
28 );
29
30 $schema['handler_info'] = array(
31 'fields' => array(
32 'handler' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
33 'slot' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
34 'title' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
35 'class' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
36 'description' => array('type' => 'text', 'not null' => TRUE)),
37 'primary key' => array('handler', 'slot'),
38 );
39
40 $schema['handler_mapping'] = array(
41 'fields' => array(
42 'slot' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
43 't1' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
44 't2' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
45 't3' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
46 't4' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
47 't5' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
48 'handler' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE)),
49 'primary key' => array('slot', 't1', 't2', 't3', 't4', 't5'),
50 );
51
52 return $schema;
53 }
54
55 /**
56 * Implementation of hook_uninstall().
57 */
58 function handler_uninstall() {
59 drupal_uninstall_schema('handler');
60 }

  ViewVC Help
Powered by ViewVC 1.1.2