You are here

mail_edit.install in Mail Editor 5

Same filename and directory in other branches
  1. 6 mail_edit.install
  2. 7 mail_edit.install

File

mail_edit.install
View source
<?php

function mail_edit_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {mail_edit} (\n          description varchar(255) NOT NULL,\n          subject varchar(255) NOT NULL,\n          body TEXT,\n          mailkey varchar(255) NOT NULL,\n          PRIMARY KEY  (mailkey)\n        ) /*!40100 DEFAULT CHARACTER SET utf8 */");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {mail_edit} (\n          description varchar(255) NOT NULL,\n          subject varchar(255) NOT NULL,\n          body text,\n          mailkey varchar(255) NOT NULL,\n          PRIMARY KEY (mailkey)\n        )");
      break;
  }
}
function mail_edit_uninstall() {
  db_query("DROP TABLE {mail_edit}");
}