| 1 |
<?php
|
| 2 |
// $Id: og_titles.install,v 1.1 2008/10/15 02:01:02 mradcliffe Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* hook_install implementation
|
| 6 |
*/
|
| 7 |
function og_titles_install()
|
| 8 |
{
|
| 9 |
drupal_install_schema('og_titles');
|
| 10 |
drupal_set_message('Installed og_uid_titles table into the database');
|
| 11 |
} // function og_titles_install
|
| 12 |
|
| 13 |
|
| 14 |
/**
|
| 15 |
* hook_uninstall implementation
|
| 16 |
*/
|
| 17 |
function og_titles_uninstall()
|
| 18 |
{
|
| 19 |
drupal_uninstall_schema('og_titles');
|
| 20 |
} // function og_titles_uninstall
|
| 21 |
|
| 22 |
|
| 23 |
/**
|
| 24 |
* hook_schema implementation -- we are just adding a simple table that adheres to the og_ table namespace
|
| 25 |
*/
|
| 26 |
function og_titles_schema()
|
| 27 |
{
|
| 28 |
$schema['og_uid_titles'] = array(
|
| 29 |
'description' => t('This is the og_uid_titles table for the og_titles module.'),
|
| 30 |
'fields' => array(
|
| 31 |
nid => array( 'type' => 'int', 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('Node id reference') ),
|
| 32 |
uid => array( 'type' => 'int', 'size' => 'normal', 'not null' => TRUE, 'description' => t('User id reference') ),
|
| 33 |
title => array( 'type' => 'varchar', 'length' => '255', 'not null' => FALSE, 'description' => t('Arbitrary custom title or rank.') )
|
| 34 |
),
|
| 35 |
'primary key' => array('nid','uid')
|
| 36 |
);
|
| 37 |
|
| 38 |
return $schema;
|
| 39 |
} // function og_titles_schema
|
| 40 |
|