You are here

function pmpapi_pull_schema in Public Media Platform API Integration 7

Implements hook_schema().

File

pmpapi_pull/pmpapi_pull.install, line 42
Install, update and uninstall functions for the pmpapi_pull module.

Code

function pmpapi_pull_schema() {
  $schema['pmpapi_pull_pulled_docs'] = array(
    'description' => 'A table that tracks pulled docs from the PMP.',
    'fields' => array(
      'guid' => array(
        'description' => 'The PMP GUID of this entity.',
        'type' => 'char',
        'length' => 36,
        'not null' => TRUE,
      ),
      'changed' => array(
        'description' => 'The Unix timestamp when the doc was (re-)pulled.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'valid_from' => array(
        'description' => 'The date-time that content is valid from.',
        'type' => 'char',
        'length' => 25,
      ),
      'valid_to' => array(
        'description' => 'The date-time that content is valid to.',
        'type' => 'char',
        'length' => 25,
      ),
    ),
    'primary key' => array(
      'guid',
    ),
  );
  return $schema;
}