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

Contents of /contributions/modules/spaces/spaces.install

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


Revision 1.3 - (show annotations) (download) (as text)
Mon Oct 6 21:56:40 2008 UTC (13 months, 2 weeks ago) by yhahn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +107 -29 lines
File MIME type: text/x-php
Beginning merge of Spaces 2 to DRUPAL-6 branch
1 <?php
2 // $Id: spaces.install,v 1.1.6.1 2008/09/19 13:48:54 yhahn Exp $
3
4 /**
5 * Implementaton of hook_install().
6 */
7 function spaces_install() {
8 drupal_install_schema('spaces');
9 }
10
11 /**
12 * Implementation of hook_uninstall()
13 */
14 function spaces_uninstall() {
15 drupal_uninstall_schema('spaces');
16
17 // Delete variables
18 $variables = array();
19 foreach ($variables as $variable) {
20 variable_del($variable);
21 }
22 }
23
24 /**
25 * Implementation of hook_schema()
26 */
27 function spaces_schema() {
28 $schema = array();
29 $schema['spaces'] = array(
30 'description' => t('spaces.'),
31 'fields' => array(
32 'sid' => array(
33 'description' => t('The space id.'),
34 'type' => 'int',
35 'size' => 'tiny',
36 'unsigned' => TRUE,
37 'not null' => TRUE,
38 'default' => 0,
39 ),
40 'type' => array(
41 'description' => t('The space type.'),
42 'type' => 'varchar',
43 'length' => 64,
44 'not null' => TRUE,
45 ),
46 'preset' => array(
47 'description' => t('The space preset.'),
48 'type' => 'varchar',
49 'length' => 64,
50 'not null' => TRUE,
51 ),
52 'customizer' => array(
53 'description' => t('The spaces customizer stored as a serialized array.'),
54 'type' => 'text',
55 'size' => 'big',
56 ),
57 ),
58 'unique keys' => array(
59 'key1' => array('sid', 'type'),
60 ),
61 );
62 $schema['spaces_presets'] = array(
63 'description' => t('spaces presets.'),
64 'fields' => array(
65 'type' => array(
66 'description' => t('The space type for which this preset applies.'),
67 'type' => 'varchar',
68 'length' => '64',
69 'not null' => TRUE,
70 ),
71 'id' => array(
72 'description' => t('The preset string identifier.'),
73 'type' => 'varchar',
74 'length' => 64,
75 'not null' => TRUE,
76 ),
77 'name' => array(
78 'description' => t('The human-readable name for this preset.'),
79 'type' => 'varchar',
80 'length' => 64,
81 'not null' => TRUE,
82 ),
83 'description' => array(
84 'description' => t('The description for this preset.'),
85 'type' => 'text',
86 'size' => 'big',
87 ),
88 'value' => array(
89 'description' => t('A serialized array that represents this preset\'s definition.'),
90 'type' => 'text',
91 'size' => 'big',
92 ),
93 ),
94 'unique keys' => array(
95 'key1' => array('type', 'id'),
96 ),
97 );
98 $schema['spaces_settings'] = array(
99 'description' => t('spaces settings.'),
100 'fields' => array(
101 'sid' => array(
102 'description' => t('The space id.'),
103 'type' => 'int',
104 'size' => 'tiny',
105 'unsigned' => TRUE,
106 'not null' => TRUE,
107 'default' => 0,
108 ),
109 'type' => array(
110 'description' => t('The space type.'),
111 'type' => 'varchar',
112 'length' => 64,
113 'not null' => TRUE,
114 ),
115 'id' => array(
116 'description' => t('The spaces setting identifer.'),
117 'type' => 'text',
118 'size' => 'big',
119 ),
120 'value' => array(
121 'description' => t('A serialized array that represents this setting\'s custom value(s).'),
122 'type' => 'text',
123 'size' => 'big',
124 ),
125 ),
126 'unique keys' => array(
127 'key1' => array('type', 'sid'),
128 ),
129 );
130 $schema['spaces_features'] = array(
131 'description' => t('spaces features.'),
132 'fields' => array(
133 'sid' => array(
134 'description' => t('The space id.'),
135 'type' => 'int',
136 'size' => 'tiny',
137 'unsigned' => TRUE,
138 'not null' => TRUE,
139 'default' => 0,
140 ),
141 'type' => array(
142 'description' => t('The space type.'),
143 'type' => 'varchar',
144 'length' => 64,
145 'not null' => TRUE,
146 ),
147 'id' => array(
148 'description' => t('The spaces feature identifer.'),
149 'type' => 'text',
150 'size' => 'big',
151 ),
152 'value' => array(
153 'description' => t('A serialized array that represents this feature\'s custom value(s).'),
154 'type' => 'text',
155 'size' => 'big',
156 ),
157 ),
158 'indexes' => array(
159 'type' => array('type', 'sid'),
160 ),
161 );
162 return $schema;
163 }

  ViewVC Help
Powered by ViewVC 1.1.2