You are here

function pmorganization_schema in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmorganization/pmorganization.install \pmorganization_schema()
  2. 7 pmorganization/pmorganization.install \pmorganization_schema()

Implements hook_schema().

File

pmorganization/pmorganization.install, line 27
PM Organization install file.

Code

function pmorganization_schema() {
  $schema['pmorganization_index'] = array(
    'description' => 'Maintains denormalized information about pm organization relationships.',
    'fields' => array(
      'nid' => array(
        'description' => 'The {node}.nid this record tracks.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'pmorganization_nid' => array(
        'description' => 'The pmorganization nid.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'created' => array(
        'description' => 'The Unix timestamp when the node was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'pmorganization_nid' => array(
        'pmorganization_nid',
      ),
    ),
    'foreign keys' => array(
      'tracked_node' => array(
        'table' => 'node',
        'columns' => array(
          'nid' => 'nid',
        ),
      ),
      'pmorganization_nid' => array(
        'table' => 'node',
        'columns' => array(
          'pmorganization_nid' => 'nid',
        ),
      ),
    ),
  );
  return $schema;
}