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

Contents of /contributions/modules/photos/photos.install

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


Revision 1.4 - (show annotations) (download) (as text)
Tue Sep 16 07:45:33 2008 UTC (14 months, 1 week ago) by eastcn
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-2, DRUPAL-6--1-4-BETA3, DRUPAL-6--1-4-BETA2, DRUPAL-6--1-4-BETA1, DRUPAL-6--1-2, DRUPAL-6--1-3, HEAD
Changes since 1.3: +0 -0 lines
File MIME type: text/x-php
*** empty log message ***
1 <?php
2 // $Id: photos.install,v 1.1.2.4 2008/09/10 03:08:38 eastcn Exp $
3 function photos_schema() {
4 $schema['x_album'] = array(
5 'fields' => array(
6 'pid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
7 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
8 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
9 ),
10 'indexes' => array(
11 'fid' => array('fid'),
12 'uid' => array('uid'),
13 ),
14 'primary key' => array('pid'),
15 );
16 $schema['x_image'] = array(
17 'fields' => array(
18 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
19 'pid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
20 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
21 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
22 'des' => array('type' => 'text', 'not null' => TRUE,'size' => 'big'),
23 'num' => array('type' => 'int', 'size' => 'tiny', 'length' => 1, 'not null' => TRUE),
24 'wid' => array('type' => 'int', 'size' => 'tiny', 'length' => 4, 'not null' => TRUE),
25 'count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
26 ),
27 'indexes' => array(
28 'nid' => array('nid'),
29 'uid' => array('uid'),
30 'pid' => array('pid'),
31 'num' => array('num'),
32 'count' => array('count'),
33 ),
34 'primary key' => array('fid'),
35 );
36
37 $schema['x_vote'] = array(
38 'fields' => array(
39 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
40 'cid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE)
41 ),
42 'indexes' => array(
43 'fid' => array('fid'),
44 'cid' => array('cid')
45 )
46 );
47 return $schema;
48 }
49
50 function photos_install() {
51
52 drupal_install_schema('photos');
53
54 }
55
56 function photos_update_1() {
57 $ret = array();
58 $schema['x_vote'] = array(
59 'fields' => array(
60 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
61 'cid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE)
62 ),
63 'indexes' => array(
64 'fid' => array('fid'),
65 'cid' => array('cid')
66 )
67 );
68 db_create_table($ret, 'x_vote', $schema['x_vote']);
69 return $ret;
70 }
71
72 function photos_update_2() {
73 $ret = array();
74 db_add_field($ret, 'x_image', 'count', array('type' => 'int', 'not null' => TRUE));
75 return $ret;
76 }

  ViewVC Help
Powered by ViewVC 1.1.2