Newer
Older
// $Id$
/**
* @file
* Install file for privatemsg.module
*/
function privatemsg_schema() {
$schema = array();
$schema['pm_index'] = array(
'description' => '{pm_index} holds indexing information about messages and recepients for fast retrieval',
'description' => 'Private Message ID',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
'thread_id' => array(
'description' => 'Messages thread ID',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
'description' => 'UID of either the author or the recipient',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
'description' => 'Whether the user has read this message',
'description' => 'Whether the user has deleted this message',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0
'mid' => array('mid'),
'thread_id' => array('thread_id'),
'uid' => array('uid'),
'is_new' => array('mid', 'uid', 'is_new', ),
'description' => '{pm_messages} holds the message information',
'description' => 'Private Message ID',
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
),
'author' => array(
'description' => 'UID of the author',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
'subject' => array(
'description' => 'Subject text of the message',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'body' => array(
'description' => 'Body of the message',
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
),
Sascha Grossenbacher
committed
'format' => array(
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
'description' => 'The {filter_formats}.format of the message text.',
),
'description' => 'Time when the message was sent',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
'author' => array('author'),
'subject' => array(array('subject', 20)),
'timestamp' => array('timestamp'),
Sascha Grossenbacher
committed
$schema['pm_disable'] = array(
'description' => '{pm_disable} holds the list of users that have disabled private messaging',
'fields' => array(
'uid' => array(
'description' => 'ID of the user',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
),
'primary key' => array('uid'),
);
function privatemsg_uninstall() {
variable_del('private_message_view_template');
variable_del('privatemsg_per_page');
variable_del('privatemsg_display_loginmessage');
variable_del('privatemsg_display_fields');
Sascha Grossenbacher
committed
variable_del('privatemsg_display_link_self');
Sascha Grossenbacher
committed
variable_del('privatemsg_view_default_amount');
variable_del('privatemsg_view_max_amount');
variable_del('privatemsg_view_use_max_as_default');
Sascha Grossenbacher
committed
variable_del('privatemsg_display_profile_links');
variable_del('privatemsg_link_node_types');
variable_del('privatemsg_display_on_teaser');
variable_del('privatemsg_display_on_comments');