| 1 |
<?php
|
| 2 |
// $Id: pds.install,v 1.1 2008/09/30 16:45:53 coltrane Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_install().
|
| 6 |
*/
|
| 7 |
function pds_install() {
|
| 8 |
drupal_install_schema('pds');
|
| 9 |
}
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of hook_schema().
|
| 13 |
*/
|
| 14 |
function pds_schema() {
|
| 15 |
$schema['pds_items'] = array(
|
| 16 |
'description' => t('Table for pds items.'),
|
| 17 |
'fields' => array(
|
| 18 |
'pds_id' => array(
|
| 19 |
'type' => 'serial',
|
| 20 |
'unsigned' => TRUE,
|
| 21 |
'not null' => TRUE,
|
| 22 |
),
|
| 23 |
'pds_name' => array(
|
| 24 |
'type' => 'varchar',
|
| 25 |
'length' => 255,
|
| 26 |
'not null' => TRUE,
|
| 27 |
'default' => '',
|
| 28 |
),
|
| 29 |
'pds_type' => array(
|
| 30 |
'type' => 'varchar',
|
| 31 |
'length' => 255,
|
| 32 |
'not null' => TRUE,
|
| 33 |
'default' => '',
|
| 34 |
),
|
| 35 |
'pds_unit' => array(
|
| 36 |
'type' => 'varchar',
|
| 37 |
'length' => 255,
|
| 38 |
'not null' => TRUE,
|
| 39 |
'default' => '',
|
| 40 |
),
|
| 41 |
'pds_key' => array(
|
| 42 |
'type' => 'varchar',
|
| 43 |
'length' => 255,
|
| 44 |
'not null' => TRUE,
|
| 45 |
'default' => '',
|
| 46 |
),
|
| 47 |
'pds_value' => array(
|
| 48 |
'type' => 'varchar',
|
| 49 |
'length' => 255,
|
| 50 |
'not null' => TRUE,
|
| 51 |
'default' => '',
|
| 52 |
),
|
| 53 |
'pds_weight' => array(
|
| 54 |
'type' => 'int',
|
| 55 |
'not null' => TRUE,
|
| 56 |
'default' => 0,
|
| 57 |
),
|
| 58 |
'pds_properties' => array(
|
| 59 |
'type' => 'varchar',
|
| 60 |
'length' => 32,
|
| 61 |
'not null' => TRUE,
|
| 62 |
'default' => '',
|
| 63 |
),
|
| 64 |
),
|
| 65 |
'primary key' => array('pds_id'),
|
| 66 |
'indexes' => array(
|
| 67 |
'name' => array('pds_name'),
|
| 68 |
),
|
| 69 |
);
|
| 70 |
|
| 71 |
return $schema;
|
| 72 |
}
|
| 73 |
|
| 74 |
/**
|
| 75 |
* Implementation of hook_uninstall().
|
| 76 |
*/
|
| 77 |
function pds_uninstall() {
|
| 78 |
drupal_uninstall_schema('pds');
|
| 79 |
}
|