Fix to ensure panels isn't improperly overriding child path items when falling back.
[project/panels.git] / panels.install
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_schema().
6 */
7 function panels_schema() {
8 // This should always point to our 'current' schema. This makes it relatively easy
9 // to keep a record of schema as we make changes to it.
10 return panels_schema_1();
11 }
12
13 /**
14 * Schema version 1 for Panels in D6.
15 */
16 function panels_schema_1() {
17 $schema = array();
18
19 $schema['panels_display'] = array(
20 'fields' => array(
21 'did' => array(
22 'type' => 'serial',
23 'not null' => TRUE,
24 ),
25 'layout' => array(
26 'type' => 'varchar',
27 'length' => '32',
28 ),
29 'layout_settings' => array(
30 'type' => 'text',
31 'size' => 'big',
32 ),
33 'panel_settings' => array(
34 'type' => 'text',
35 'size' => 'big',
36 ),
37 'cache' => array(
38 'type' => 'text',
39 ),
40 'title' => array(
41 'type' => 'varchar',
42 'length' => '255',
43 ),
44 'hide_title' => array(
45 'type' => 'int',
46 'size' => 'tiny',
47 ),
48 ),
49 'primary key' => array('did'),
50 );
51
52 $schema['panels_pane'] = array(
53 'fields' => array(
54 'pid' => array(
55 'type' => 'serial',
56 'not null' => TRUE,
57 ),
58 'did' => array(
59 'type' => 'int',
60 'not null' => TRUE,
61 'default' => 0,
62 ),
63 'panel' => array(
64 'type' => 'varchar',
65 'length' => '32',
66 ),
67 'type' => array(
68 'type' => 'varchar',
69 'length' => '32',
70 ),
71 'subtype' => array(
72 'type' => 'varchar',
73 'length' => '64',
74 ),
75 'shown' => array(
76 'type' => 'int',
77 'size' => 'tiny',
78 'default' => 1,
79 ),
80 'access' => array(
81 'type' => 'varchar',
82 'length' => '128',
83 ),
84 'visibility' => array(
85 'type' => 'text',
86 'size' => 'big',
87 ),
88 'configuration' => array(
89 'type' => 'text',
90 'size' => 'big',
91 ),
92 'cache' => array(
93 'type' => 'text',
94 'size' => 'big',
95 ),
96 'position' => array(
97 'type' => 'int',
98 'size' => 'small',
99 ),
100 ),
101 'primary key' => array('pid'),
102 'indexes' => array(
103 'did_idx' => array('did')
104 ),
105 );
106
107 $schema['panels_object_cache'] = array(
108 'fields' => array(
109 'sid' => array(
110 'type' => 'varchar',
111 'length' => '64',
112 ),
113 'did' => array(
114 'type' => 'int',
115 ),
116 'obj' => array(
117 'type' => 'varchar',
118 'length' => '255',
119 ),
120 'data' => array(
121 'type' => 'text',
122 'size' => 'big',
123 ),
124 'timestamp' => array(
125 'type' => 'int',
126 ),
127 ),
128 'indexes' => array(
129 'idx' => array('sid', 'obj', 'did'),
130 'time_idx' => array('timestamp')
131 ),
132 );
133 return $schema;
134 }
135
136 /**
137 * Implementation of hook_install().
138 */
139 function panels_install() {
140 db_query("UPDATE {system} SET weight = 10 WHERE name = 'panels'");
141 drupal_set_message(st('Please keep in mind that this is an Alpha release of Panels for Drupal 6, and is NOT intended for use on production sites.'));
142 drupal_set_message(st('Additionally, the upgrade path from Drupal 5 has NOT been resolved, and should not be attempted.'));
143 drupal_set_message(st('Bug reports are encouraged, especially when they come with patches! The <a href="@link">Panels project page</a> has details on filing issues.', array('@link' => 'http://drupal.org/project/panels')));
144 drupal_install_schema('panels');
145 }
146
147 /**
148 * Implementation of hook_uninstall().
149 */
150 function panels_uninstall() {
151 drupal_uninstall_schema('panels');
152 }
153