function fillpdf_schema in FillPDF 6
Same name and namespace in other branches
- 7.2 fillpdf.install \fillpdf_schema()
- 7 fillpdf.install \fillpdf_schema()
@file Install
File
- ./fillpdf.install, line 9 
- Install
Code
function fillpdf_schema() {
  $schema = array();
  $schema['fillpdf_forms'] = array(
    'fields' => array(
      'fid' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      '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,
      ),
    ),
    'primary key' => array(
      'fid',
    ),
  );
  $schema['fillpdf_fields'] = array(
    'fields' => array(
      'fid' => array(
        'type' => 'int',
        'not null' => TRUE,
      ),
      'pdf_key' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'value' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'replacements' => array(
        'type' => 'text',
        'size' => 'normal',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'fid',
      'pdf_key',
    ),
  );
  return $schema;
}