You are here

function views_data_export_schema in Views data export 7.4

Same name and namespace in other branches
  1. 6.3 views_data_export.install \views_data_export_schema()
  2. 6 views_data_export.install \views_data_export_schema()
  3. 6.2 views_data_export.install \views_data_export_schema()
  4. 7 views_data_export.install \views_data_export_schema()
  5. 7.3 views_data_export.install \views_data_export_schema()

Implementation of hook_schema()

File

./views_data_export.install, line 6

Code

function views_data_export_schema() {
  $schema = array();
  $schema['views_data_export'] = array(
    'description' => t('Keep track of currently executing exports.'),
    'fields' => array(
      'eid' => array(
        'description' => 'Unique id for each on-going export.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'view_name' => array(
        'type' => 'varchar',
        'length' => '128',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The unique name of the view. This is the primary field views are loaded from, and is used so that views may be internal and not necessarily in the database. May only be alphanumeric characters plus underscores.',
      ),
      'view_display_id' => array(
        'type' => 'varchar',
        'length' => '64',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The unique name of the view. This is the primary field views are loaded from, and is used so that views may be internal and not necessarily in the database. May only be alphanumeric characters plus underscores.',
      ),
      'time_stamp' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The time this export started',
      ),
      'fid' => array(
        'description' => 'Files ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'batch_state' => array(
        'type' => 'varchar',
        'length' => '32',
        'default' => 'init',
        'not null' => TRUE,
        'description' => 'The current state of the batch.',
      ),
      'sandbox' => array(
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'primary key' => array(
      'eid',
    ),
  );
  $schema['views_data_export_object_cache'] = array(
    'description' => 'A modified version of the views_object_cache that ignores session id.',
    'fields' => array(
      'eid' => array(
        'type' => 'varchar',
        'length' => '64',
        'description' => 'The export ID this view equates too.',
      ),
      'updated' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The time this cache was created or updated.',
      ),
      'data' => array(
        'type' => 'blob',
        'size' => 'big',
        'description' => 'Serialized data being stored.',
        'serialize' => TRUE,
      ),
    ),
    'indexes' => array(
      'eid' => array(
        'eid',
      ),
      'updated' => array(
        'updated',
      ),
    ),
  );
  return $schema;
}