~pwolanin/+junk/AD-pressflow-6

« back to all changes in this revision

Viewing changes to modules/node/node.install

  • Committer: bzr
  • Date: 2009-01-15 00:30:06 UTC
  • Revision ID: bzr@web3.fourkitchens.com-20090115003006-09rbv04r2gw9bnkd
DrupalĀ 6.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: node.install,v 1.4.2.2 2008/12/10 21:24:43 goba Exp $
 
2
// $Id: node.install,v 1.4.2.3 2009/01/06 15:46:37 goba Exp $
3
3
 
4
4
/**
5
5
 * Implementation of hook_schema().
6
6
 */
7
7
function node_schema() {
8
8
  $schema['node'] = array(
9
 
    'description' => t('The base table for nodes.'),
 
9
    'description' => 'The base table for nodes.',
10
10
    'fields' => array(
11
11
      'nid' => array(
12
 
        'description' => t('The primary identifier for a node.'),
 
12
        'description' => 'The primary identifier for a node.',
13
13
        'type' => 'serial',
14
14
        'unsigned' => TRUE,
15
15
        'not null' => TRUE),
16
16
      'vid' => array(
17
 
        'description' => t('The current {node_revisions}.vid version identifier.'),
 
17
        'description' => 'The current {node_revisions}.vid version identifier.',
18
18
        'type' => 'int',
19
19
        'unsigned' => TRUE,
20
20
        'not null' => TRUE,
21
21
        'default' => 0),
22
22
      'type' => array(
23
 
        'description' => t('The {node_type}.type of this node.'),
 
23
        'description' => 'The {node_type}.type of this node.',
24
24
        'type' => 'varchar',
25
25
        'length' => 32,
26
26
        'not null' => TRUE,
27
27
        'default' => ''),
28
28
      'language' => array(
29
 
        'description' => t('The {languages}.language of this node.'),
 
29
        'description' => 'The {languages}.language of this node.',
30
30
        'type' => 'varchar',
31
31
        'length' => 12,
32
32
        'not null' => TRUE,
33
33
        'default' => ''),
34
34
      'title' => array(
35
 
        'description' => t('The title of this node, always treated as non-markup plain text.'),
 
35
        'description' => 'The title of this node, always treated as non-markup plain text.',
36
36
        'type' => 'varchar',
37
37
        'length' => 255,
38
38
        'not null' => TRUE,
39
39
        'default' => ''),
40
40
      'uid' => array(
41
 
        'description' => t('The {users}.uid that owns this node; initially, this is the user that created it.'),
 
41
        'description' => 'The {users}.uid that owns this node; initially, this is the user that created it.',
42
42
        'type' => 'int',
43
43
        'not null' => TRUE,
44
44
        'default' => 0),
45
45
      'status' => array(
46
 
        'description' => t('Boolean indicating whether the node is published (visible to non-administrators).'),
 
46
        'description' => 'Boolean indicating whether the node is published (visible to non-administrators).',
47
47
        'type' => 'int',
48
48
        'not null' => TRUE,
49
49
        'default' => 1),
50
50
      'created' => array(
51
 
        'description' => t('The Unix timestamp when the node was created.'),
 
51
        'description' => 'The Unix timestamp when the node was created.',
52
52
        'type' => 'int',
53
53
        'not null' => TRUE,
54
54
        'default' => 0),
55
55
      'changed' => array(
56
 
        'description' => t('The Unix timestamp when the node was most recently saved.'),
 
56
        'description' => 'The Unix timestamp when the node was most recently saved.',
57
57
        'type' => 'int',
58
58
        'not null' => TRUE,
59
59
        'default' => 0),
60
60
      'comment' => array(
61
 
        'description' => t('Whether comments are allowed on this node: 0 = no, 1 = read only, 2 = read/write.'),
 
61
        'description' => 'Whether comments are allowed on this node: 0 = no, 1 = read only, 2 = read/write.',
62
62
        'type' => 'int',
63
63
        'not null' => TRUE,
64
64
        'default' => 0),
65
65
      'promote' => array(
66
 
        'description' => t('Boolean indicating whether the node should be displayed on the front page.'),
 
66
        'description' => 'Boolean indicating whether the node should be displayed on the front page.',
67
67
        'type' => 'int',
68
68
        'not null' => TRUE,
69
69
        'default' => 0),
70
70
      'moderate' => array(
71
 
        'description' => t('Previously, a boolean indicating whether the node was "in moderation"; mostly no longer used.'),
 
71
        'description' => 'Previously, a boolean indicating whether the node was "in moderation"; mostly no longer used.',
72
72
        'type' => 'int',
73
73
        'not null' => TRUE,
74
74
        'default' => 0),
75
75
      'sticky' => array(
76
 
        'description' => t('Boolean indicating whether the node should be displayed at the top of lists in which it appears.'),
 
76
        'description' => 'Boolean indicating whether the node should be displayed at the top of lists in which it appears.',
77
77
        'type' => 'int',
78
78
        'not null' => TRUE,
79
79
        'default' => 0),
80
80
      'tnid' => array(
81
 
        'description' => t('The translation set id for this node, which equals the node id of the source post in each set.'),
 
81
        'description' => 'The translation set id for this node, which equals the node id of the source post in each set.',
82
82
        'type' => 'int',
83
83
        'unsigned' => TRUE,
84
84
        'not null' => TRUE,
85
85
        'default' => 0),
86
86
      'translate' => array(
87
 
        'description' => t('A boolean indicating whether this translation page needs to be updated.'),
 
87
        'description' => 'A boolean indicating whether this translation page needs to be updated.',
88
88
        'type' => 'int',
89
89
        'not null' => TRUE,
90
90
        'default' => 0),
108
108
    );
109
109
 
110
110
  $schema['node_access'] = array(
111
 
    'description' => t('Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.'),
 
111
    'description' => 'Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.',
112
112
    'fields' => array(
113
113
      'nid' => array(
114
 
        'description' => t('The {node}.nid this record affects.'),
 
114
        'description' => 'The {node}.nid this record affects.',
115
115
        'type' => 'int',
116
116
        'unsigned' => TRUE,
117
117
        'not null' => TRUE,
118
118
        'default' => 0),
119
119
      'gid' => array(
120
 
        'description' => t("The grant ID a user must possess in the specified realm to gain this row's privileges on the node."),
 
120
        'description' => "The grant ID a user must possess in the specified realm to gain this row's privileges on the node.",
121
121
        'type' => 'int',
122
122
        'unsigned' => TRUE,
123
123
        'not null' => TRUE,
124
124
        'default' => 0),
125
125
      'realm' => array(
126
 
        'description' => t('The realm in which the user must possess the grant ID. Each node access node can define one or more realms.'),
 
126
        'description' => 'The realm in which the user must possess the grant ID. Each node access node can define one or more realms.',
127
127
        'type' => 'varchar',
128
128
        'length' => 255,
129
129
        'not null' => TRUE,
130
130
        'default' => ''),
131
131
      'grant_view' => array(
132
 
        'description' => t('Boolean indicating whether a user with the realm/grant pair can view this node.'),
 
132
        'description' => 'Boolean indicating whether a user with the realm/grant pair can view this node.',
133
133
        'type' => 'int',
134
134
        'unsigned' => TRUE,
135
135
        'not null' => TRUE,
136
136
        'default' => 0,
137
137
        'size' => 'tiny'),
138
138
      'grant_update' => array(
139
 
        'description' => t('Boolean indicating whether a user with the realm/grant pair can edit this node.'),
 
139
        'description' => 'Boolean indicating whether a user with the realm/grant pair can edit this node.',
140
140
        'type' => 'int',
141
141
        'unsigned' => TRUE,
142
142
        'not null' => TRUE,
143
143
        'default' => 0,
144
144
        'size' => 'tiny'),
145
145
      'grant_delete' => array(
146
 
        'description' => t('Boolean indicating whether a user with the realm/grant pair can delete this node.'),
 
146
        'description' => 'Boolean indicating whether a user with the realm/grant pair can delete this node.',
147
147
        'type' => 'int',
148
148
        'unsigned' => TRUE,
149
149
        'not null' => TRUE,
154
154
    );
155
155
 
156
156
  $schema['node_counter'] = array(
157
 
    'description' => t('Access statistics for {node}s.'),
 
157
    'description' => 'Access statistics for {node}s.',
158
158
    'fields' => array(
159
159
      'nid' => array(
160
 
        'description' => t('The {node}.nid for these statistics.'),
 
160
        'description' => 'The {node}.nid for these statistics.',
161
161
        'type' => 'int',
162
162
        'not null' => TRUE,
163
163
        'default' => 0),
164
164
      'totalcount' => array(
165
 
        'description' => t('The total number of times the {node} has been viewed.'),
 
165
        'description' => 'The total number of times the {node} has been viewed.',
166
166
        'type' => 'int',
167
167
        'unsigned' => TRUE,
168
168
        'not null' => TRUE,
169
169
        'default' => 0,
170
170
        'size' => 'big'),
171
171
      'daycount' => array(
172
 
        'description' => t('The total number of times the {node} has been viewed today.'),
 
172
        'description' => 'The total number of times the {node} has been viewed today.',
173
173
        'type' => 'int',
174
174
        'unsigned' => TRUE,
175
175
        'not null' => TRUE,
176
176
        'default' => 0,
177
177
        'size' => 'medium'),
178
178
      'timestamp' => array(
179
 
        'description' => t('The most recent time the {node} has been viewed.'),
 
179
        'description' => 'The most recent time the {node} has been viewed.',
180
180
        'type' => 'int',
181
181
        'unsigned' => TRUE,
182
182
        'not null' => TRUE,
186
186
    );
187
187
 
188
188
  $schema['node_revisions'] = array(
189
 
    'description' => t('Stores information about each saved version of a {node}.'),
 
189
    'description' => 'Stores information about each saved version of a {node}.',
190
190
    'fields' => array(
191
191
      'nid' => array(
192
 
        'description' => t('The {node} this version belongs to.'),
 
192
        'description' => 'The {node} this version belongs to.',
193
193
        'type' => 'int',
194
194
        'unsigned' => TRUE,
195
195
        'not null' => TRUE,
196
196
        'default' => 0),
197
197
      'vid' => array(
198
 
        'description' => t('The primary identifier for this version.'),
 
198
        'description' => 'The primary identifier for this version.',
199
199
        'type' => 'serial',
200
200
        'unsigned' => TRUE,
201
201
        'not null' => TRUE),
202
202
      'uid' => array(
203
 
        'description' => t('The {users}.uid that created this version.'),
 
203
        'description' => 'The {users}.uid that created this version.',
204
204
        'type' => 'int',
205
205
        'not null' => TRUE,
206
206
        'default' => 0),
207
207
      'title' => array(
208
 
        'description' => t('The title of this version.'),
 
208
        'description' => 'The title of this version.',
209
209
        'type' => 'varchar',
210
210
        'length' => 255,
211
211
        'not null' => TRUE,
212
212
        'default' => ''),
213
213
      'body' => array(
214
 
        'description' => t('The body of this version.'),
 
214
        'description' => 'The body of this version.',
215
215
        'type' => 'text',
216
216
        'not null' => TRUE,
217
217
        'size' => 'big'),
218
218
      'teaser' => array(
219
 
        'description' => t('The teaser of this version.'),
 
219
        'description' => 'The teaser of this version.',
220
220
        'type' => 'text',
221
221
        'not null' => TRUE,
222
222
        'size' => 'big'),
223
223
      'log' => array(
224
 
        'description' => t('The log entry explaining the changes in this version.'),
 
224
        'description' => 'The log entry explaining the changes in this version.',
225
225
        'type' => 'text',
226
226
        'not null' => TRUE,
227
227
        'size' => 'big'),
228
228
      'timestamp' => array(
229
 
        'description' => t('A Unix timestamp indicating when this version was created.'),
 
229
        'description' => 'A Unix timestamp indicating when this version was created.',
230
230
        'type' => 'int',
231
231
        'not null' => TRUE,
232
232
        'default' => 0),
233
233
      'format' => array(
234
 
        'description' => t("The input format used by this version's body."),
 
234
        'description' => "The input format used by this version's body.",
235
235
        'type' => 'int',
236
236
        'not null' => TRUE,
237
237
        'default' => 0)
244
244
    );
245
245
 
246
246
  $schema['node_type'] = array(
247
 
    'description' => t('Stores information about all defined {node} types.'),
 
247
    'description' => 'Stores information about all defined {node} types.',
248
248
    'fields' => array(
249
249
      'type' => array(
250
 
        'description' => t('The machine-readable name of this type.'),
 
250
        'description' => 'The machine-readable name of this type.',
251
251
        'type' => 'varchar',
252
252
        'length' => 32,
253
253
        'not null' => TRUE),
254
254
      'name' => array(
255
 
        'description' => t('The human-readable name of this type.'),
 
255
        'description' => 'The human-readable name of this type.',
256
256
        'type' => 'varchar',
257
257
        'length' => 255,
258
258
        'not null' => TRUE,
259
259
        'default' => ''),
260
260
      'module' => array(
261
 
        'description' => t('The base string used to construct callbacks corresponding to this node type.'),
 
261
        'description' => 'The base string used to construct callbacks corresponding to this node type.',
262
262
        'type' => 'varchar',
263
263
        'length' => 255,
264
264
        'not null' => TRUE),
265
265
      'description'    => array(
266
 
        'description' => t('A brief description of this type.'),
 
266
        'description' => 'A brief description of this type.',
267
267
        'type' => 'text',
268
268
        'not null' => TRUE,
269
269
        'size' => 'medium'),
270
270
      'help' => array(
271
 
        'description' => t('Help information shown to the user when creating a {node} of this type.'),
 
271
        'description' => 'Help information shown to the user when creating a {node} of this type.',
272
272
        'type' => 'text',
273
273
        'not null' => TRUE,
274
274
        'size' => 'medium'),
275
275
      'has_title' => array(
276
 
        'description' => t('Boolean indicating whether this type uses the {node}.title field.'),
 
276
        'description' => 'Boolean indicating whether this type uses the {node}.title field.',
277
277
        'type' => 'int',
278
278
        'unsigned' => TRUE,
279
279
        'not null' => TRUE,
280
280
        'size' => 'tiny'),
281
281
      'title_label' => array(
282
 
        'description' => t('The label displayed for the title field on the edit form.'),
 
282
        'description' => 'The label displayed for the title field on the edit form.',
283
283
        'type' => 'varchar',
284
284
        'length' => 255,
285
285
        'not null' => TRUE,
286
286
        'default' => ''),
287
287
      'has_body' => array(
288
 
        'description' => t('Boolean indicating whether this type uses the {node_revisions}.body field.'),
 
288
        'description' => 'Boolean indicating whether this type uses the {node_revisions}.body field.',
289
289
        'type' => 'int',
290
290
        'unsigned' => TRUE,
291
291
        'not null' => TRUE,
292
292
        'size' => 'tiny'),
293
293
      'body_label' => array(
294
 
        'description' => t('The label displayed for the body field on the edit form.'),
 
294
        'description' => 'The label displayed for the body field on the edit form.',
295
295
        'type' => 'varchar',
296
296
        'length' => 255,
297
297
        'not null' => TRUE,
298
298
        'default' => ''),
299
299
      'min_word_count' => array(
300
 
        'description' => t('The minimum number of words the body must contain.'),
 
300
        'description' => 'The minimum number of words the body must contain.',
301
301
        'type' => 'int',
302
302
        'unsigned' => TRUE,
303
303
        'not null' => TRUE,
304
304
        'size' => 'small'),
305
305
      'custom' => array(
306
 
        'description' => t('A boolean indicating whether this type is defined by a module (FALSE) or by a user via a module like the Content Construction Kit (TRUE).'),
 
306
        'description' => 'A boolean indicating whether this type is defined by a module (FALSE) or by a user via a module like the Content Construction Kit (TRUE).',
307
307
        'type' => 'int',
308
308
        'not null' => TRUE,
309
309
        'default' => 0,
310
310
        'size' => 'tiny'),
311
311
      'modified' => array(
312
 
        'description' => t('A boolean indicating whether this type has been modified by an administrator; currently not used in any way.'),
 
312
        'description' => 'A boolean indicating whether this type has been modified by an administrator; currently not used in any way.',
313
313
        'type' => 'int',
314
314
        'not null' => TRUE,
315
315
        'default' => 0,
316
316
        'size' => 'tiny'),
317
317
      'locked' => array(
318
 
        'description' => t('A boolean indicating whether the administrator can change the machine name of this type.'),
 
318
        'description' => 'A boolean indicating whether the administrator can change the machine name of this type.',
319
319
        'type' => 'int',
320
320
        'not null' => TRUE,
321
321
        'default' => 0,
322
322
        'size' => 'tiny'),
323
323
      'orig_type' => array(
324
 
        'description' => t('The original machine-readable name of this node type. This may be different from the current type name if the locked field is 0.'),
 
324
        'description' => 'The original machine-readable name of this node type. This may be different from the current type name if the locked field is 0.',
325
325
        'type' => 'varchar',
326
326
        'length' => 255,
327
327
        'not null' => TRUE,