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

Contents of /contributions/modules/draggableviews/draggableviews.install

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


Revision 1.7 - (show annotations) (download) (as text)
Thu Jan 8 22:38:36 2009 UTC (10 months, 2 weeks ago) by sevi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +34 -1 lines
File MIME type: text/x-php
Fundamental changes:
*) Introduction of handlers (handle saving and outputting)
1 <?php
2 // $Id: draggableviews.install,v 1.6 2008/09/21 20:36:49 sevi Exp $
3
4 /**
5 * @file
6 * Draggableviews defines a new database schema
7 * for saving the collapsed/expand state of views.
8 */
9
10 /**
11 * Implementation of hook_schema().
12 */
13 function draggableviews_schema() {
14 $schema['draggableviews_collapsed'] = array(
15 'description' => t('The table that knows whether sub-lists are collapsed or expanded.'),
16 'fields' => array(
17 'uid' => array(
18 'description' => t('The user.'),
19 'type' => 'int',
20 'unsigned' => TRUE,
21 'not null' => TRUE,
22 'default' => 0,
23 ),
24 'parent_nid' => array(
25 'description' => t('The parent node.'),
26 'type' => 'int',
27 'unsigned' => TRUE,
28 'not null' => TRUE,
29 'default' => 0,
30 ),
31 'collapsed' => array(
32 'description' => t('The state.'),
33 'type' => 'int',
34 'unsigned' => TRUE,
35 'not null' => TRUE,
36 'default' => 0,
37 ),
38 ),
39 'primary key' => array('uid', 'parent_nid'),
40 );
41
42 $schema['draggableviews_structure'] = array(
43 'description' => t('The table saves the order settings of an draggableview.'),
44 'fields' => array(
45 'vid' => array(
46 'description' => t('Makes the order unique for each view.'),
47 'type' => 'int',
48 'unsigned' => TRUE,
49 'not null' => FALSE,
50 'default' => 0,
51 ),
52 'nid' => array(
53 'description' => t('The node id.'),
54 'type' => 'int',
55 'unsigned' => TRUE,
56 'not null' => TRUE,
57 ),
58 'delta' => array(
59 'description' => t('Makes the order unique for each level.'),
60 'type' => 'int',
61 'unsigned' => TRUE,
62 'not null' => TRUE,
63 ),
64 'value' => array(
65 'description' => t('The order.'),
66 'type' => 'int',
67 'unsigned' => FALSE,
68 'not null' => TRUE,
69 'default' => 0,
70 ),
71 ),
72 'primary key' => array('vid', 'nid', 'delta'),
73 );
74 return $schema;
75 }
76
77 /**
78 * Implementation of hook_install().
79 */
80 function draggableviews_install() {
81 drupal_install_schema('draggableviews');
82 }
83
84 /**
85 * Implementation of hook_uninstall().
86 */
87 function draggableviews_uninstall() {
88 drupal_uninstall_schema('draggableviews');
89 }

  ViewVC Help
Powered by ViewVC 1.1.2