function tripal_chado_add_featuremapprop_table
3.x tripal_chado.chado_v1.2.inc | tripal_chado_add_featuremapprop_table() |
Add custom tables needed by the feature map module
- featuremapprop
- featuremap_dbxref
- featureposprop
1 call to tripal_chado_add_featuremapprop_table()
- tripal_chado_add_v1_2_custom_tables in tripal_chado/
includes/ setup/ tripal_chado.setup.inc - For Chado v1.2 Tripal provides some new custom tables.
File
- tripal_chado/
includes/ setup/ tripal_chado.chado_v1.2.inc, line 144
Code
function tripal_chado_add_featuremapprop_table() {
// add the featuremaprop table to Chado
$schema = array(
'table' => 'featuremapprop',
'fields' => array(
'featuremapprop_id' => array(
'type' => 'serial',
'not null' => true,
),
'featuremap_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 => 'featuremapprop_id',
),
'unique keys' => array(
'featuremapprop_c1' => array(
0 => 'featuremap_id',
1 => 'type_id',
2 => 'rank',
),
),
'indexes' => array(
'featuremapprop_idx1' => array(
0 => 'featuremap_id',
),
'featuremapprop_idx2' => array(
0 => 'type_id',
),
),
'foreign keys' => array(
'cvterm' => array(
'table' => 'cvterm',
'columns' => array(
'type_id' => 'cvterm_id',
),
),
'featuremap' => array(
'table' => 'featuremap',
'columns' => array(
'featuremap_id' => 'featuremap_id',
),
),
),
);
chado_create_custom_table('featuremapprop', $schema, TRUE, NULL, FALSE);
}