function print_pdf_install in Printer, email and PDF versions 5.4
Same name and namespace in other branches
- 6 print_pdf/print_pdf.install \print_pdf_install()
- 5.x print_pdf/print_pdf.install \print_pdf_install()
Implementation of hook_install().
File
- print_pdf/
print_pdf.install, line 13 - Install file of the print_pdf module
Code
function print_pdf_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {print_pdf_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_pdf_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 PRIMARY KEY (path)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {print_pdf_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_pdf_page_counter} (\n path varchar(128) NOT NULL,\n totalcount bigint NOT NULL default '0',\n timestamp int_unsigned NOT NULL default '0',\n PRIMARY KEY (path)\n )");
break;
}
// Module weight
db_query("UPDATE {system} SET weight = 2 WHERE name = 'print_pdf'");
}