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

Contents of /contributions/modules/validateage/validateage.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Jan 21 01:19:16 2009 UTC (10 months ago) by gwen
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
ran the module through deadwood and coder modules to clean it up; removed dependency on profile module
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Implementation of module.install
7 */
8
9 /**
10 * Implementation of hook_install()
11 */
12 function validateage_install() {
13 drupal_install_schema('validateage');
14 }
15
16 /**
17 * Implementation of hook_schema()
18 */
19 function validateage_schema() {
20 $schema = array();
21 $schema['validateage'] = array(
22 'fields' => array(
23 'uid' => array(
24 'type' => 'int',
25 'unsigned' => TRUE,
26 'not null' => TRUE,
27 ),
28 'month' => array(
29 'type' => 'int',
30 'unsigned' => TRUE,
31 'not null' => TRUE,
32 ),
33 'day' => array(
34 'type' => 'int',
35 'unsigned' => TRUE,
36 'not null' => TRUE,
37 ),
38 'year' => array(
39 'type' => 'int',
40 'unsigned' => TRUE,
41 'not null' => TRUE,
42 ),
43 ),
44 'indexes' => array(
45 'month' => array('month'),
46 'day' => array('day'),
47 'year' => array('year'),
48 ),
49 'primary key' => array('uid'),
50 );
51 return $schema;
52 }
53
54 /**
55 * Implementation of hook_uninstall()
56 */
57 function validateage_uninstall() {
58 drupal_uninstall_schema('validateage');
59 }
60
61 /**
62 * Implementation of hook_update()
63 */
64 function validateage_update_6000() {
65 $ret = array();
66 $schema = validateage_schema();
67 db_create_table($ret, 'validateage', $schema['validateage']);
68 return $ret;
69 }

  ViewVC Help
Powered by ViewVC 1.1.2