'contains the setupes, their materialized view id and base table name that was used.', 'fields' => array( 'setup_id' => array( 'description' => 'the id of the setup', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ), 'mview_id' => array( 'description' => 'the materialized view used for this setup', 'type' => 'int', 'unsigned' => TRUE, ), 'base_table_name' => array( 'description' => 'the base table name to be used when using this setup', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'name' => array( 'description' => 'Human readable name of this setup', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'description' => array( 'description' => 'description of this row', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), ), 'unique_keys' => array( 'setup_id' => array('setup_id'), ), 'primary key' => array('setup_id'), ); $schema['tripal_mviews_join'] = array( 'description' => 'which materialzed views and chado tables to join in a given setup', 'fields' => array( 'setup_id' => array( 'description' => 'tripal setup id from tripal_views_integration table', 'type' => 'serial', 'unsigned' => TRUE, 'not null'=> TRUE, ), 'view_column' => array( 'description' => 'materialized view name and column', 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '', ), 'chado_column' => array( 'description' => 'which chado table and column is to be linked up to materialized view in this serach', 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '', ), ), 'unique_keys' => array( 'setup_id' => array('setup_id'), ), 'primary key' => array('setup_id'), ); $schema['tripal_views_handlers'] = array( 'description' => 'in formation for views: column and views handler name', 'fields' => array( 'setup_id' => array( 'description' => 'which setup this is used by from tripal_views_integration table', 'type' => 'serial', 'unsigned' => TRUE, 'not null'=> TRUE, ), 'column_name' => array( 'description' => '', 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '', ), 'handler_name' => array( 'description' => 'name of the views handler to be used for this particular setup', 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '', ), ), ); return $schema; } function tripal_views_integration_install(){ drupal_install_schema('tripal_views_integration'); } function tripal_views_integration_uninstall(){ drupal_uninstall_schema('tripal_views_integration'); } /* * NOTE: when updating schema for this module's tables * follow api of schema module, otherwise on uninstall * the tables will not be removed correctly * */