comparison modules/upload/upload.install @ 19:3edae6ecd6c6 6.9

Drupal 6.9
author Franck Deroche <franck@defr.org>
date Thu, 15 Jan 2009 10:15:56 +0100
parents c1f4ac30525a
children
comparison
equal deleted inserted replaced
18:f5131a9cd9e5 19:3edae6ecd6c6
1 <?php 1 <?php
2 // $Id: upload.install,v 1.6.2.1 2008/02/08 18:01:14 goba Exp $ 2 // $Id: upload.install,v 1.6.2.2 2009/01/06 15:46:38 goba Exp $
3 3
4 /** 4 /**
5 * Implementation of hook_install(). 5 * Implementation of hook_install().
6 */ 6 */
7 function upload_install() { 7 function upload_install() {
24 /** 24 /**
25 * Implementation of hook_schema(). 25 * Implementation of hook_schema().
26 */ 26 */
27 function upload_schema() { 27 function upload_schema() {
28 $schema['upload'] = array( 28 $schema['upload'] = array(
29 'description' => t('Stores uploaded file information and table associations.'), 29 'description' => 'Stores uploaded file information and table associations.',
30 'fields' => array( 30 'fields' => array(
31 'fid' => array( 31 'fid' => array(
32 'type' => 'int', 32 'type' => 'int',
33 'unsigned' => TRUE, 33 'unsigned' => TRUE,
34 'not null' => TRUE, 34 'not null' => TRUE,
35 'default' => 0, 35 'default' => 0,
36 'description' => t('Primary Key: The {files}.fid.'), 36 'description' => 'Primary Key: The {files}.fid.',
37 ), 37 ),
38 'nid' => array( 38 'nid' => array(
39 'type' => 'int', 39 'type' => 'int',
40 'unsigned' => TRUE, 40 'unsigned' => TRUE,
41 'not null' => TRUE, 41 'not null' => TRUE,
42 'default' => 0, 42 'default' => 0,
43 'description' => t('The {node}.nid associated with the uploaded file.'), 43 'description' => 'The {node}.nid associated with the uploaded file.',
44 ), 44 ),
45 'vid' => array( 45 'vid' => array(
46 'type' => 'int', 46 'type' => 'int',
47 'unsigned' => TRUE, 47 'unsigned' => TRUE,
48 'not null' => TRUE, 48 'not null' => TRUE,
49 'default' => 0, 49 'default' => 0,
50 'description' => t('Primary Key: The {node}.vid associated with the uploaded file.'), 50 'description' => 'Primary Key: The {node}.vid associated with the uploaded file.',
51 ), 51 ),
52 'description' => array( 52 'description' => array(
53 'type' => 'varchar', 53 'type' => 'varchar',
54 'length' => 255, 54 'length' => 255,
55 'not null' => TRUE, 55 'not null' => TRUE,
56 'default' => '', 56 'default' => '',
57 'description' => t('Description of the uploaded file.'), 57 'description' => 'Description of the uploaded file.',
58 ), 58 ),
59 'list' => array( 59 'list' => array(
60 'type' => 'int', 60 'type' => 'int',
61 'unsigned' => TRUE, 61 'unsigned' => TRUE,
62 'not null' => TRUE, 62 'not null' => TRUE,
63 'default' => 0, 63 'default' => 0,
64 'size' => 'tiny', 64 'size' => 'tiny',
65 'description' => t('Whether the file should be visibly listed on the node: yes(1) or no(0).'), 65 'description' => 'Whether the file should be visibly listed on the node: yes(1) or no(0).',
66 ), 66 ),
67 'weight' => array( 67 'weight' => array(
68 'type' => 'int', 68 'type' => 'int',
69 'not null' => TRUE, 69 'not null' => TRUE,
70 'default' => 0, 70 'default' => 0,
71 'size' => 'tiny', 71 'size' => 'tiny',
72 'description' => t('Weight of this upload in relation to other uploads in this node.'), 72 'description' => 'Weight of this upload in relation to other uploads in this node.',
73 ), 73 ),
74 ), 74 ),
75 'primary key' => array('vid', 'fid'), 75 'primary key' => array('vid', 'fid'),
76 'indexes' => array( 76 'indexes' => array(
77 'fid' => array('fid'), 77 'fid' => array('fid'),