You are here

function akamai_schema in Akamai 7.3

Implements hook_schema().

File

./akamai.install, line 6

Code

function akamai_schema() {
  $schema['akamai_purge_requests'] = array(
    'description' => 'Information about outstanding purge requests.',
    'fields' => array(
      'purge_id' => array(
        'description' => 'External ID of the purge request.',
        'type' => 'varchar',
        'length' => 36,
        'not null' => TRUE,
        'default' => '',
      ),
      'support_id' => array(
        'description' => 'Support ID for the purge request.',
        'type' => 'varchar',
        'length' => 36,
        'not null' => TRUE,
        'default' => '',
      ),
      'estimated_seconds' => array(
        'description' => 'Estimated number of seconds until request is fulfilled.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => NULL,
      ),
      'progress_uri' => array(
        'description' => 'URI at which the progress of the purge request can be checked.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
        'default' => NULL,
      ),
      'status' => array(
        'description' => 'The status of the purge request.',
        'type' => 'varchar',
        'length' => 36,
        'not null' => TRUE,
        'default' => 'Submitted',
      ),
      'submission_time' => array(
        'description' => 'The Unix timestamp when the request was submitted.',
        'type' => 'int',
        'default' => NULL,
      ),
      'last_checked' => array(
        'description' => 'The Unix timestamp when the status of the request was last checked.',
        'type' => 'int',
        'default' => NULL,
      ),
      'check_after' => array(
        'description' => 'Unix timestamp used to determine if the status of this request should be checked.',
        'type' => 'int',
        'default' => NULL,
      ),
      'completion_time' => array(
        'description' => 'The Unix timestamp when the request was fulfilled.',
        'type' => 'int',
        'default' => NULL,
      ),
      'hostname' => array(
        'description' => 'The hostname that was submitted in the purge request.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'paths' => array(
        'description' => 'The paths (objects) that were submitted in the purge request.',
        'type' => 'text',
        'serialize' => TRUE,
        'size' => 'medium',
      ),
    ),
    'indexes' => array(
      'check_after' => array(
        'check_after',
      ),
      'completion_time' => array(
        'completion_time',
      ),
      'submission_time' => array(
        'submission_time',
      ),
    ),
    'primary key' => array(
      'purge_id',
    ),
  );
  return $schema;
}