function tripal_pub_add_custom_tables
2.x tripal_pub.install | tripal_pub_add_custom_tables() |
1.x tripal_pub.install | tripal_pub_add_custom_tables() |
1 call to tripal_pub_add_custom_tables()
- tripal_pub_install in tripal_pub/
tripal_pub.install - Implementation of hook_install().
File
- tripal_pub/
tripal_pub.install, line 113 - This file contains all the functions which describe and implement drupal database tables needed by this module. This module was developed by Chad N.A. Krilow and Lacey-Anne Sanderson, University of Saskatchewan.
Code
function tripal_pub_add_custom_tables() {
$schema = array(
'table' => 'pubauthor_contact',
'fields' => array(
'pubauthor_contact_id' => array(
'type' => 'serial',
'not null' => true,
),
'contact_id' => array(
'type' => 'int',
'not null' => true,
),
'pubauthor_id' => array(
'type' => 'int',
'not null' => true,
),
),
'primary key' => array(
0 => 'pubauthor_contact_id',
),
'unique keys' => array(
'pubauthor_contact_c1' => array(
0 => 'contact_id',
1 => 'pubauthor_id',
),
),
'foreign keys' => array(
'contact' => array(
'table' => 'contact',
'columns' => array(
'contact_id' => 'contact_id',
),
),
'pubauthor' => array(
'table' => 'pubauthor',
'columns' => array(
'pubauthor_id' => 'pubauthor_id',
),
),
),
);
tripal_core_create_custom_table($ret, 'pubauthor_contact', $schema, TRUE);
}