| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 | <?phpfunction tripal_views_search_schema(){	$schema = array();	$schema['tripal_views_search'] = array(		'description' => 'contains the searches, their materialized view id and base table name that was used.',		'fields' => array(			'tripal_search_id' => array(				'description' => 'the id of the search',				'type' => 'serial',				'unsigned' => TRUE,				'not null' => TRUE,			),			'mview_id' => array(				'description' => 'the materialized view used for this search',				'type' => 'int',				'unsigned' => TRUE,			),			'base_table_name' => array(				'description' => 'the base table name to be used when using this search',				'type' => 'varchar',				'length' => 255,				'not null' => TRUE,				'default' => '',			),		),		'unique_keys' => array(			'tripal_search_id' => array('tripal_search_id'),		),		'primary key' => array('tripal_search_id'),	);	$schema['tripal_mviews_join'] = array(		'description' => 'which materialzed views and chado tables to join in a given search',		'fields' => array(			'tripal_search_id' => array(				'description' => 'tripal search id from tripal_views_search 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(			'tripal_search_id' => array('tripal_search_id'),		),		'primary key' => array('tripal_search_id'),	);	$schema['tripal_views_handlers'] = array(		'description' => 'in formation for views: column and views handler name',		'fields' => array(			'tripal_search_id' => array(				'description' => 'which search this is used by from tripal_views_search 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 search',				'type' => 'varchar',				'length' => '255',				'not null' => TRUE,				'default' => '',			),		), 	);	return $schema;}function tripal_views_search_install(){	drupal_install_schema('tripal_views_search');}function tripal_views_search_uninstall(){	drupal_uninstall_schema('tripal_views_search');}/* * NOTE: when updating schema for this module's tables * follow api of schema module, otherwise on uninstall * the tables will not be removed correctly * */
 |