| 1 |
<?php
|
| 2 |
// $Id: jott.install,v 1.4 2008/02/13 21:34:15 coltrane Exp $
|
| 3 |
|
| 4 |
/*
|
| 5 |
* Implementation of hook_install().
|
| 6 |
*/
|
| 7 |
function jott_install() {
|
| 8 |
drupal_install_schema('jott');
|
| 9 |
}
|
| 10 |
|
| 11 |
/*
|
| 12 |
* Implementation of hook_schema().
|
| 13 |
*/
|
| 14 |
function jott_schema() {
|
| 15 |
$schema['jott_user'] = array(
|
| 16 |
'description' => t('Jott user data.'),
|
| 17 |
'fields' => array(
|
| 18 |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
|
| 19 |
'userkey' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE),
|
| 20 |
'postbackurl' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')
|
| 21 |
),
|
| 22 |
'primary key' => array('uid')
|
| 23 |
);
|
| 24 |
$schema['jott_node'] = array(
|
| 25 |
'description' => t('Jott post data.'),
|
| 26 |
'fields' => array(
|
| 27 |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
|
| 28 |
'listen' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
|
| 29 |
'confidence' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'tiny', 'not null' => TRUE, 'default' => 0)
|
| 30 |
),
|
| 31 |
'primary key' => array('nid')
|
| 32 |
);
|
| 33 |
|
| 34 |
return $schema;
|
| 35 |
}
|
| 36 |
|
| 37 |
/*
|
| 38 |
* Implementation of hook_uninstall().
|
| 39 |
*/
|
| 40 |
function jott_uninstall() {
|
| 41 |
drupal_uninstall_schema('jott');
|
| 42 |
// Delete variables the modules user.
|
| 43 |
variable_del('jott_post_low_confidence');
|
| 44 |
variable_del('jott_parse_message');
|
| 45 |
variable_del('jott_parse_separator');
|
| 46 |
}
|