You are here

function print_update_5302 in Printer, email and PDF versions 5.4

Update to version 5.x-4.1

File

./print.install, line 198
Install file of the print module

Code

function print_update_5302() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {print_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_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_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_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;
}