You are here

function pmproject_schema in Drupal PM (Project Management) 7

Same name and namespace in other branches
  1. 8 pmproject/pmproject.install \pmproject_schema()
  2. 7.3 pmproject/pmproject.install \pmproject_schema()

Implements hook_schema().

File

pmproject/pmproject.install, line 191
Installation functions for the Project Management project module

Code

function pmproject_schema() {
  $schema['pmproject'] = 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' => 100,
      ),
      'projectstatus' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'projectcategory' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'projectpriority' => 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,
      ),
      'manager_nid' => array(
        'type' => 'int',
      ),
      'manager_title' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      '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',
      ),
      'manager_nid' => array(
        'manager_nid',
      ),
      'assigned_nid' => array(
        'assigned_nid',
      ),
    ),
  );
  return $schema;
}