You are here

function fillpdf_schema in FillPDF 7.2

Same name and namespace in other branches
  1. 6 fillpdf.install \fillpdf_schema()
  2. 7 fillpdf.install \fillpdf_schema()

Implements hook_schema().

File

./fillpdf.install, line 11
Install

Code

function fillpdf_schema() {
  $schema = array();
  $schema['fillpdf_forms'] = array(
    'fields' => array(
      'fid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 512,
        'not null' => TRUE,
      ),
      'default_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),
      'url' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'destination_path' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'replacements' => array(
        'type' => 'text',
        'size' => 'normal',
        'not null' => FALSE,
      ),
      'destination_redirect' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),
      'admin_title' => array(
        'type' => 'varchar',
        'length' => 512,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'fid',
    ),
  );
  $schema['fillpdf_fields'] = array(
    'fields' => array(
      'fid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'pdf_key' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'prefix' => array(
        'type' => 'varchar',
        'length' => 4096,
        'not null' => FALSE,
      ),
      'value' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'suffix' => array(
        'type' => 'varchar',
        'length' => 4096,
        'not null' => FALSE,
      ),
      'replacements' => array(
        'type' => 'text',
        'size' => 'normal',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'fid',
      'pdf_key',
    ),
  );
  return $schema;
}