function background_process_schema in Background Process 7.2
Same name and namespace in other branches
- 8 background_process.install \background_process_schema()
- 6 background_process.install \background_process_schema()
- 7 background_process.install \background_process_schema()
Implements of hook_schema().
File
- ./
background_process.install, line 17 - This is the installation file for the Background Process module
Code
function background_process_schema() {
$schema = array();
$schema['background_process'] = array(
'fields' => array(
'pid' => array(
'type' => 'serial',
'size' => 'big',
),
'handle' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'token' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'callback' => array(
'type' => 'blob',
'size' => 'big',
'not null' => FALSE,
),
'arguments' => array(
'type' => 'blob',
'size' => 'big',
'not null' => FALSE,
),
'options' => array(
'type' => 'blob',
'size' => 'big',
'not null' => FALSE,
),
'service_group' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
'service_host' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
'keepalive' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'progress' => array(
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => -1,
),
'progress_message' => array(
'type' => 'blob',
'size' => 'big',
'not null' => FALSE,
),
'created' => array(
'type' => 'numeric',
'precision' => '16',
'scale' => '6',
'not null' => TRUE,
'default' => 0,
),
'start_stamp' => array(
'type' => 'numeric',
'precision' => '16',
'scale' => '6',
'not null' => TRUE,
'default' => 0,
),
'exec_status' => array(
'type' => 'int',
'size' => 'normal',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'pid',
),
'unique keys' => array(
'uni_handle' => array(
'handle',
),
),
'indexes' => array(
'idx_created' => array(
'created',
),
'idx_start' => array(
'start_stamp',
),
),
);
$schema['background_process_result'] = array(
'fields' => array(
'pid' => array(
'type' => 'int',
'size' => 'normal',
'default' => 0,
'not null',
),
'result' => array(
'type' => 'blob',
'size' => 'big',
'not null' => FALSE,
),
'created' => array(
'type' => 'int',
'size' => 'normal',
'default' => 0,
'not null',
),
),
'primary key' => array(
'pid',
),
'indexes' => array(
'idx_created' => array(
'created',
),
),
);
return $schema;
}