You are here

function pmticket_schema in Drupal PM (Project Management) 7

Implements hook_schema().

File

pmticket/pmticket.install, line 194
Installation functions for the Project Management project module

Code

function pmticket_schema() {
  $schema['pmticket'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'organization_nid' => array(
        'type' => 'int',
      ),
      'organization_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'project_nid' => array(
        'type' => 'int',
      ),
      'project_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'task_nid' => array(
        'type' => 'int',
      ),
      'task_stepno' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'task_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'ticketcategory' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'ticketstatus' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'ticketpriority' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'pricemode' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'price' => array(
        'type' => 'float',
      ),
      'currency' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'durationunit' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'duration' => array(
        'type' => 'float',
        'default' => 0,
      ),
      'assigned_nid' => array(
        'type' => 'int',
      ),
      'assigned_title' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
    ),
    'primary key' => array(
      'vid',
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'organization_nid' => array(
        'organization_nid',
      ),
      'project_nid' => array(
        'project_nid',
      ),
      'task_nid' => array(
        'task_nid',
      ),
      'assigned_nid' => array(
        'assigned_nid',
      ),
    ),
  );
  return $schema;
}