You are here

function print_pdf_update_6001 in Printer, email and PDF versions 5.4

Same name and namespace in other branches
  1. 6 print_pdf/print_pdf.install \print_pdf_update_6001()
  2. 5.x print_pdf/print_pdf.install \print_pdf_update_6001()

Update to version 5.x-4.1

File

print_pdf/print_pdf.install, line 116
Install file of the print_pdf module

Code

function print_pdf_update_6001() {
  $ret = array();
  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;
  }
  return $ret;
}