You are here

function pmpapi_schema in Public Media Platform API Integration 7

Implements hook_schema().

File

./pmpapi.install, line 54
Install, update and uninstall functions for the PMPAPI Push module.

Code

function pmpapi_schema() {
  $schema['pmpapi_local_docs'] = array(
    'description' => 'Stores local PMP docs data (that is not stored elsewhere, e.g., in fields).',
    'fields' => array(
      'entity_type' => array(
        'description' => 'The type of this entity (e.g., node).',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'entity_id' => array(
        'description' => 'The (Drupal) unique identifier (e.g., value of the nid, for a node).',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'guid' => array(
        'description' => 'The PMP GUID of this entity.',
        'type' => 'char',
        'length' => 36,
        'not null' => TRUE,
      ),
      'permissions' => array(
        'description' => 'The PMP permissions of this entity (as a serialized array of objects).',
        'type' => 'blob',
      ),
    ),
    'indexes' => array(
      'guid' => array(
        'guid',
      ),
    ),
    'primary key' => array(
      'entity_type',
      'entity_id',
    ),
  );
  return $schema;
}