/[drupal]/contributions/modules/casetracker/casetracker_mail.install
ViewVC logotype

Contents of /contributions/modules/casetracker/casetracker_mail.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Fri Nov 23 07:51:33 2007 UTC (2 years ago) by zero2one
Branch: MAIN
CVS Tags: DRUPAL-5--1-3-BETA1, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +10 -1 lines
File MIME type: text/x-php
#179089 by zero2one: Added pgsql support, fixed typos in the uninstall script
1 <?php
2 // $Id: casetracker_mail.install,v 1.1 2007/01/09 16:02:00 morbus Exp $
3
4 /**
5 * Implementation of hook_install().
6 *
7 * Database schema last updated 2006-12 by Morbus Iff.
8 *
9 * casetracker_mail:
10 * msg_id: the message ID of an outgoing mail notification.
11 * nid: the node ID to which this outgoing mail refers.
12 * cid: the comment ID to which this outgoing mail refers.
13 */
14 function casetracker_mail_install() {
15 switch ($GLOBALS['db_type']) {
16 case 'mysql':
17 case 'mysqli':
18 db_query("CREATE TABLE {casetracker_mail} (
19 msg_id varchar(250) NOT NULL,
20 nid int(11) NOT NULL,
21 cid int(11) NOT NULL,
22 PRIMARY KEY (msg_id)
23 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
24 break;
25
26 case 'pgsql':
27 db_query("CREATE TABLE {casetracker_mail} (
28 msg_id varchar(250) NOT NULL,
29 nid numeric(11) NOT NULL,
30 cid numeric(11) NOT NULL,
31 PRIMARY KEY (msg_id)
32 )");
33 break;
34 }
35 }
36
37 /**
38 * Implementation of hook_uninstall().
39 */
40 function casetracker_mail_uninstall() {
41 db_query('DROP TABLE {casetracker_mail}');
42 variable_del('casetracker_mail_address');
43 variable_del('casetracker_mail_subject');
44 variable_del('casetracker_mail_case_message');
45 variable_del('casetracker_mail_comment_message');
46 }

  ViewVC Help
Powered by ViewVC 1.1.2