function print_mail_install in Printer, email and PDF versions 5.4
Same name and namespace in other branches
- 6 print_mail/print_mail.install \print_mail_install()
- 5.x print_mail/print_mail.install \print_mail_install()
Implementation of hook_install().
File
- print_mail/
print_mail.install, line 13 - Install file of the print_mail module
Code
function print_mail_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {print_mail_node_conf} (\n nid int(10) unsigned NOT NULL,\n link tinyint(3) unsigned NOT NULL default '1',\n comments tinyint(3) unsigned NOT NULL default '1',\n url_list tinyint(3) unsigned NOT NULL default '1',\n PRIMARY KEY (nid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
db_query("CREATE TABLE {print_mail_page_counter} (\n path varchar(128) NOT NULL,\n totalcount bigint(20) unsigned NOT NULL default '0',\n timestamp int(10) unsigned NOT NULL default '0',\n sentcount bigint(20) unsigned NOT NULL default '0',\n sent_timestamp int(10) unsigned NOT NULL default '0',\n PRIMARY KEY (path)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {print_mail_node_conf} (\n nid int_unsigned NOT NULL,\n link smallint NOT NULL default '1',\n comments smallint_unsigned NOT NULL default '1',\n url_list smallint_unsigned NOT NULL default '1',\n PRIMARY KEY (nid)\n )");
db_query("CREATE TABLE {print_mail_page_counter} (\n path varchar(128) NOT NULL,\n totalcount bigint NOT NULL default '0',\n timestamp int_unsigned NOT NULL default '0',\n sentcount bigint NOT NULL default '0',\n sent_timestamp int_unsigned NOT NULL default '0',\n PRIMARY KEY (path)\n )");
break;
}
// Module weight
db_query("UPDATE {system} SET weight = 1 WHERE name = 'print_mail'");
}