You are here

function print_schema in Printer, email and PDF versions 7

Same name and namespace in other branches
  1. 6 print.install \print_schema()
  2. 7.2 print.install \print_schema()
  3. 5.x print.install \print_schema()

Implements hook_schema().

File

./print.install, line 86
Install, update and uninstall functions for the print module.

Code

function print_schema() {
  $schema['print_node_conf'] = array(
    'description' => 'Printer-friendly version node-specific configuration settings',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'The {node}.nid of the node.',
      ),
      'link' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
        'description' => 'Show link',
      ),
      'comments' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
        'description' => 'Show link in individual comments',
      ),
      'url_list' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
        'description' => 'Show Printer-friendly URLs list',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  $schema['print_page_counter'] = array(
    'description' => 'Printer-friendly version access counter',
    'fields' => array(
      'path' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Page path',
      ),
      'totalcount' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'size' => 'big',
        'description' => 'Number of page accesses',
      ),
      'timestamp' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Last access',
      ),
    ),
    'primary key' => array(
      'path',
    ),
  );
  return $schema;
}