function mailhandler_install in Mailhandler 5
Same name and namespace in other branches
- 6.2 mailhandler.install \mailhandler_install()
- 6 mailhandler.install \mailhandler_install()
- 7 mailhandler.install \mailhandler_install()
Implementation of hook_install().
File
- ./
mailhandler.install, line 6
Code
function mailhandler_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("\n CREATE TABLE {mailhandler} (\n mid int(10) unsigned not null auto_increment primary key,\n mail varchar(255) not null,\n domain varchar(255) not null,\n port int(5) unsigned not null, \n name varchar(255) not null,\n pass varchar(255) not null,\n security tinyint unsigned not null,\n replies tinyint unsigned not null default '1',\n fromheader varchar(128),\n commands text, \n sigseparator varchar(128),\n enabled tinyint,\n folder varchar(255) not null,\n imap tinyint unsigned not null,\n mime VARCHAR (128),\n mailto varchar(255) not null,\n delete_after_read tinyint unsigned not null default '1',\n extraimap varchar(255) not null,\n format int(4) NOT NULL default '0',\n KEY (mail)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("\n CREATE TABLE {mailhandler} (\n mid serial,\n mail text not null,\n domain text not null,\n port integer not null, \n name text not null,\n pass text not null,\n security integer not null,\n replies integer not null default 1,\n fromheader text,\n commands text, \n sigseparator text,\n enabled integer,\n folder text not null,\n imap integer not null,\n mime text,\n mailto text not null,\n delete_after_read integer not null default 1,\n extraimap text not null,\n format integer NOT NULL default 0,\n PRIMARY KEY (mid)\n ); \n \n ");
break;
}
}