| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Definition of hook_schema();
|
| 6 |
*/
|
| 7 |
function og_reg_keys_schema() {
|
| 8 |
$schema = array();
|
| 9 |
$schema['og_reg_keys'] = array(
|
| 10 |
'description' => t('Track group registration keys for each group based on nid.'),
|
| 11 |
'fields' => array(
|
| 12 |
'nid' => array(
|
| 13 |
'description' => t("The group's {node}.nid."),
|
| 14 |
'type' => 'int',
|
| 15 |
'size' => 'normal',
|
| 16 |
'not null' => TRUE,
|
| 17 |
'default' => 0,
|
| 18 |
),
|
| 19 |
'code' => array(
|
| 20 |
'description' => t('Registration code. Must be unique.'),
|
| 21 |
'type' => 'varchar',
|
| 22 |
'length' => 64,
|
| 23 |
'not null' => TRUE,
|
| 24 |
'default' => '',
|
| 25 |
),
|
| 26 |
),
|
| 27 |
'primary key' => array('nid'),
|
| 28 |
'indexes' => array(
|
| 29 |
'code' => array('code'),
|
| 30 |
),
|
| 31 |
);
|
| 32 |
|
| 33 |
return $schema;
|
| 34 |
}
|
| 35 |
|
| 36 |
|
| 37 |
function og_reg_keys_install() {
|
| 38 |
drupal_install_schema('og_reg_keys');
|
| 39 |
}
|
| 40 |
|
| 41 |
function og_reg_keys_uninstall() {
|
| 42 |
drupal_uninstall_schema('og_reg_keys');
|
| 43 |
}
|