function tripal_library_schema

2.x tripal_library.install tripal_library_schema()
3.x tripal_library.install tripal_library_schema()
1.x tripal_library.install tripal_library_schema()

Implementation of hook_schema().

Related topics

File

tripal_library/tripal_library.install, line 77
Installation of the library module

Code

function tripal_library_schema() {
  $schema['chado_library'] = 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
      ),
      'library_id' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0
      )
    ),
    'indexes' => array(
      'chado_library_idx1' => array('library_id')
    ),
    'unique keys' => array(
      'chado_library_uq1' => array('nid', 'vid'),
      'chado_library_uq2' => array('vid')
    ),
    'primary key' => array('nid'),
  );
  return $schema;
}