You are here

function hosting_task_schema in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 task/hosting_task.install \hosting_task_schema()
  2. 7.3 task/hosting_task.install \hosting_task_schema()

Implements hook_schema().

File

task/hosting_task.install, line 10
Define the database schema and update functions for the hosting_task module.

Code

function hosting_task_schema() {
  $schema['hosting_task'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'task_type' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'rid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'task_status' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
      'executed' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
      'delta' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  $schema['hosting_task_arguments'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'name' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'value' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
    ),
    'indexes' => array(
      'vid' => array(
        'vid',
      ),
      'nid' => array(
        'nid',
      ),
    ),
  );
  $schema['hosting_task_log'] = array(
    'fields' => array(
      'lid' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'vid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'type' => array(
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => '',
      ),
      'message' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
      'error' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'type' => array(
        'type',
      ),
      'vid_lid' => array(
        'vid',
        'lid',
      ),
      'nid' => array(
        'nid',
      ),
    ),
    'primary key' => array(
      'lid',
    ),
  );
  return $schema;
}