|
@@ -53,106 +53,6 @@ function tripal_entities_schema() {
|
|
|
// Links Biological Data Entities to the chado "base" table the data is stored in.
|
|
|
$schema['chado_entity'] = tripal_entities_chado_entity_schema();
|
|
|
|
|
|
- // @TODO: Move these tables into the tripal_fields_layout module.
|
|
|
- $schema['tripal_panels'] = array(
|
|
|
- 'description' => 'The list of panels into which fields can be placed.',
|
|
|
- 'fields' => array(
|
|
|
- 'panel_id' => array(
|
|
|
- 'description' => 'The primary identifier for this table.',
|
|
|
- 'type' => 'serial',
|
|
|
- 'unsigned' => TRUE,
|
|
|
- 'not null' => TRUE,
|
|
|
- ),
|
|
|
- 'bundle_id' => array(
|
|
|
- 'description' => 'A bundle ID from the tripal_bundle table.',
|
|
|
- 'type' => 'int',
|
|
|
- 'not null' => TRUE,
|
|
|
- ),
|
|
|
- 'name' => array(
|
|
|
- 'description' => 'The computer readable name for the panel. This name must only have alphanumerical characters and underscores and must not begin with a number. ',
|
|
|
- 'type' => 'varchar',
|
|
|
- 'length' => 128,
|
|
|
- 'not null' => TRUE,
|
|
|
- 'default' => '',
|
|
|
- ),
|
|
|
- 'label' => array(
|
|
|
- 'description' => 'A human readable name for panel. This name will be shown to users in the sidebar menu.',
|
|
|
- 'type' => 'varchar',
|
|
|
- 'length' => 128,
|
|
|
- 'not null' => TRUE,
|
|
|
- 'default' => '',
|
|
|
- ),
|
|
|
- 'settings' => array(
|
|
|
- 'description' => 'Contains a serialized array tripal_fields_layoutof settings for the panel.',
|
|
|
- 'type' => 'text',
|
|
|
- 'not null' => FALSE,
|
|
|
- ),
|
|
|
- 'weight' => array(
|
|
|
- 'type' => 'int',
|
|
|
- 'not null' => FALSE,
|
|
|
- 'default' => 0
|
|
|
- ),
|
|
|
- ),
|
|
|
- 'indexes' => array(
|
|
|
- 'bundle_id' => array('bundle_id'),
|
|
|
- ),
|
|
|
- 'unique keys' => array(
|
|
|
- 'bundle_panel' => array('bundle_id', 'name'),
|
|
|
- ),
|
|
|
- 'foreign keys' => array(
|
|
|
- 'tripal_bundle' => array(
|
|
|
- 'table' => 'tripal_bundle',
|
|
|
- 'columns' => array(
|
|
|
- 'bundle_id' => 'id',
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- 'primary key' => array('panel_id'),
|
|
|
- );
|
|
|
- $schema['tripal_panel_fields'] = array(
|
|
|
- 'description' => 'The list of panels into which fields can be placed.',
|
|
|
- 'fields' => array(
|
|
|
- 'panel_field_id' => array(
|
|
|
- 'description' => 'The primary identifier for this table.',
|
|
|
- 'type' => 'serial',
|
|
|
- 'unsigned' => TRUE,
|
|
|
- 'not null' => TRUE,
|
|
|
- ),
|
|
|
- 'panel_id' => array(
|
|
|
- 'description' => 'The primary identifier for this table.',
|
|
|
- 'type' => 'int',
|
|
|
- 'not null' => TRUE,
|
|
|
- ),
|
|
|
- 'field_id' => array(
|
|
|
- 'description' => 'A bundle ID from the tripal_bundle table.',
|
|
|
- 'type' => 'int',
|
|
|
- 'not null' => TRUE,
|
|
|
- ),
|
|
|
- ),
|
|
|
- 'indexes' => array(
|
|
|
- 'panel_id' => array('panel_id'),
|
|
|
- 'field_id' => array('field_id'),
|
|
|
- ),
|
|
|
- 'unique keys' => array(
|
|
|
- 'panel_field' => array('panel_id', 'field_id'),
|
|
|
- ),
|
|
|
- 'foreign keys' => array(
|
|
|
- 'tripal_panel' => array(
|
|
|
- 'table' => 'tripal_panel',
|
|
|
- 'columns' => array(
|
|
|
- 'panel_id' => 'panel_id',
|
|
|
- ),
|
|
|
- ),
|
|
|
- 'field_config' => array(
|
|
|
- 'table' => 'field_config',
|
|
|
- 'columns' => array(
|
|
|
- 'field_id' => 'id',
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- 'primary key' => array('panel_field_id'),
|
|
|
- );
|
|
|
-
|
|
|
return $schema;
|
|
|
}
|
|
|
|