View source
<?php
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' => '32',
'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' => '32',
'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' => 'text',
'default' => '',
'not null' => TRUE,
'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',
'description' => 'Serialized data being stored.',
'serialize' => TRUE,
),
),
'indexes' => array(
'eid' => array(
'eid',
),
'updated' => array(
'updated',
),
),
);
return $schema;
}
function views_data_export_install() {
drupal_install_schema('views_data_export');
}
function views_data_export_uninstall() {
views_data_export_garbage_collect(0, -1);
drupal_uninstall_schema('views_data_export');
}