| 1 |
<?php
|
| 2 |
// $Id: condition.install,v 1.2 2008/02/14 09:28:56 fokke Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Conditions are sets of requirements that make the condition met or not.
|
| 7 |
* Other modules can use this to provide conditional actions.
|
| 8 |
*/
|
| 9 |
|
| 10 |
/**
|
| 11 |
* Implementation of hook_install().
|
| 12 |
*/
|
| 13 |
function condition_install() {
|
| 14 |
drupal_install_schema('condition');
|
| 15 |
}
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Implementation of hook_uninstall().
|
| 19 |
*/
|
| 20 |
function condition_uninstall() {
|
| 21 |
drupal_uninstall_schema('condition');
|
| 22 |
}
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Implementation of hook_schema().
|
| 26 |
*/
|
| 27 |
function condition_schema() {
|
| 28 |
$schema['conditions'] = array(
|
| 29 |
'fields' => array(
|
| 30 |
'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
|
| 31 |
'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
|
| 32 |
'weight' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0),
|
| 33 |
'status' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 1),
|
| 34 |
'parameters' => array('type' => 'text', 'size' => 'big'),
|
| 35 |
),
|
| 36 |
'primary key' => array('cid'),
|
| 37 |
);
|
| 38 |
|
| 39 |
return $schema;
|
| 40 |
}
|