You are here

casetracker_mail.install in Case Tracker 5

File

casetracker_mail.install
View source
<?php

/**
 * Implementation of hook_install().
 *
 * Database schema last updated 2006-12 by Morbus Iff.
 *
 *   casetracker_mail:
 *     msg_id: the message ID of an outgoing mail notification.
 *     nid: the node ID to which this outgoing mail refers.
 *     cid: the comment ID to which this outgoing mail refers.
 */
function casetracker_mail_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {casetracker_mail} (\n        msg_id varchar(250) NOT NULL,\n        nid int(11) NOT NULL,\n        cid int(11) NOT NULL,\n        PRIMARY KEY (msg_id)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {casetracker_mail} (\n        msg_id varchar(250) NOT NULL,\n        nid numeric(11) NOT NULL,\n        cid numeric(11) NOT NULL,\n        PRIMARY KEY  (msg_id)\n      )");
      break;
  }
}

/**
 * Implementation of hook_uninstall().
 */
function casetracker_mail_uninstall() {
  db_query('DROP TABLE {casetracker_mail}');
  variable_del('casetracker_mail_address');
  variable_del('casetracker_mail_subject');
  variable_del('casetracker_mail_case_message');
  variable_del('casetracker_mail_comment_message');
}

Functions

Namesort descending Description
casetracker_mail_install Implementation of hook_install().
casetracker_mail_uninstall Implementation of hook_uninstall().