You are here

function print_update_6002 in Printer, email and PDF versions 5.x

Same name and namespace in other branches
  1. 6 print.install \print_update_6002()

Update to version 6.x-1.1

File

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

Code

function print_update_6002() {
  $ret = array();
  $lastversion = drupal_get_installed_schema_version('print');
  if ($lastversion >= 5302 && $lastversion < 6000) {
    return $ret;
  }
  $schema['print_node_conf'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'link' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => '1',
        'size' => 'tiny',
      ),
      'comments' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => '1',
        'size' => 'tiny',
      ),
      'url_list' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => '1',
        'size' => 'tiny',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  $schema['print_page_counter'] = array(
    'fields' => array(
      'path' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
      ),
      'totalcount' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'size' => 'big',
      ),
      'timestamp' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'path',
    ),
  );
  db_create_table($ret, 'print_node_conf', $schema['print_node_conf']);
  db_create_table($ret, 'print_page_counter', $schema['print_page_counter']);
  return $ret;
}