'{pm_index} holds indexing information about messages and recepients for fast retrieval', 'fields' => array( 'mid' => array( '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, ), 'uid' => array( 'description' => 'UID of either the author or the recipient', 'type' => 'int', 'not null' => TRUE, 'unsigned' => TRUE, ), 'is_new' => array( 'description' => 'Whether the user has read this message', 'type' => 'int', 'default' => 1, 'not null' => TRUE, 'unsigned' => TRUE, ), 'deleted' => array( 'description' => 'Whether the user has deleted this message', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0 ), ), 'indexes' => array( 'mid' => array('mid'), 'thread_id' => array('thread_id'), 'uid' => array('uid'), 'is_new' => array('mid', 'uid', 'is_new', ), ), ); $schema['pm_message'] = array( 'description' => '{pm_messages} holds the message information', 'fields' => array( 'mid' => array( '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', ), 'format' => array( 'type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0, 'description' => 'The {filter_formats}.format of the message text.', ), 'timestamp' => array( 'description' => 'Time when the message was sent', 'type' => 'int', 'not null' => TRUE, 'unsigned' => TRUE, ), ), 'primary key' => array('mid'), 'indexes' => array( 'author' => array('author'), 'subject' => array(array('subject', 20)), 'timestamp' => array('timestamp'), ), ); $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'), ); return $schema; } function privatemsg_uninstall() { variable_del('private_message_view_template'); variable_del('privatemsg_per_page'); variable_del('privatemsg_display_loginmessage'); variable_del('privatemsg_display_fields'); variable_del('privatemsg_display_link_self'); variable_del('privatemsg_view_default_amount'); variable_del('privatemsg_view_max_amount'); variable_del('privatemsg_view_use_max_as_default'); variable_del('privatemsg_display_profile_links'); variable_del('privatemsg_link_node_types'); variable_del('privatemsg_display_on_teaser'); variable_del('privatemsg_display_on_comments'); }