function tripal_phylogeny_add_custom_tables
2.x tripal_phylogeny.install | tripal_phylogeny_add_custom_tables() |
3.x tripal_phylogeny.install | tripal_phylogeny_add_custom_tables() |
Add any custom tables needed by this module.
- phylotreeprop: keep track of properties of phylotree
Related topics
1 call to tripal_phylogeny_add_custom_tables()
- tripal_phylogeny_install in tripal_phylogeny/
tripal_phylogeny.install - Implements hook_install().
File
- tripal_phylogeny/
tripal_phylogeny.install, line 441 - Installation of the phylotree module
Code
function tripal_phylogeny_add_custom_tables() {
$schema = array(
'table' => 'phylotreeprop',
'fields' => array(
'phylotreeprop_id' => array(
'type' => 'serial',
'not null' => true,
),
'phylotree_id' => array(
'type' => 'int',
'not null' => true,
),
'type_id' => array(
'type' => 'int',
'not null' => true,
),
'value' => array(
'type' => 'text',
'not null' => false,
),
'rank' => array(
'type' => 'int',
'not null' => true,
'default' => 0,
),
),
'primary key' => array(
0 => 'phylotreeprop_id',
),
'unique keys' => array(
'phylotreeprop_c1' => array(
0 => 'phylotree_id',
1 => 'type_id',
2 => 'rank',
),
),
'indexes' => array(
'phylotreeprop_idx1' => array(
0 => 'phylotree_id',
),
'phylotreeprop_idx2' => array(
0 => 'type_id',
),
),
'foreign keys' => array(
'cvterm' => array(
'table' => 'cvterm',
'columns' => array(
'type_id' => 'cvterm_id',
),
),
'phylotree' => array(
'table' => 'phylotree',
'columns' => array(
'phylotree_id' => 'phylotree_id',
),
),
),
);
chado_create_custom_table('phylotreeprop', $schema, TRUE);
}