You are here

function print_pdf_schema in Printer, email and PDF versions 7.2

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

Implements hook_schema().

File

print_pdf/print_pdf.install, line 59
Install, update and uninstall functions for the print_pdf module.

Code

function print_pdf_schema() {
  $schema['print_pdf_node_conf'] = array(
    'description' => 'PDF 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',
      ),
      'size' => array(
        'type' => 'varchar',
        'length' => 9,
        'description' => 'Paper size',
      ),
      'orientation' => array(
        'type' => 'varchar',
        'length' => 9,
        'description' => 'Page orientation',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  $schema['print_pdf_page_counter'] = array(
    'description' => 'PDF 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;
}