123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248 |
- <?php
- /**
- * Implements hook_chado_schema_v1_11_analysisfeatureprop()
- * Purpose: To describe the structure of 'analysisfeatureprop' to tripal
- * @see chado_insert_record()
- * @see chado_update_record()
- * @see chado_select_record()
- *
- * @return
- * An array describing the 'analysisfeatureprop' table
- *
- * @ingroup tripal_chado_v1.11_schema_api
- *
- */
- function tripal_chado_chado_schema_v1_11_analysisfeatureprop() {
- $description = array(
- 'table' => 'analysisfeatureprop',
- 'fields' => array(
- 'analysisfeatureprop_id' => array(
- 'type' => 'serial',
- 'not NULL' => '1',
- ),
- 'analysisfeature_id' => array(
- 'type' => 'int',
- 'not NULL' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not NULL' => '1',
- ),
- 'value' => array(
- 'type' => 'text',
- 'not NULL' => '',
- ),
- 'rank' => array(
- 'type' => 'int',
- 'not NULL' => '1',
- ),
- ),
- 'primary key' => array(
- 0 => 'analysisfeatureprop_id',
- ),
- 'unique keys' => array(
- 'analysisfeature_id_type_id_rank' => array(
- 0 => 'analysisfeature_id',
- 1 => 'type_id',
- 2 => 'rank',
- ),
- ),
- 'indexes' => array(
- ),
- 'foreign keys' => array(
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- 'analysisfeature' => array(
- 'table' => 'analysisfeature',
- 'columns' => array(
- 'analysisfeature_id' => 'analysisfeature_id',
- ),
- ),
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_2_tripal_obo_temp()
- * Purpose: To describe the structure of 'tripal_obo_temp' to tripal
- * @see chado_insert_record()
- * @see chado_update_record()
- * @see chado_select_record()
- *
- * @return
- * An array describing the 'tripal_obo_temp' table
- *
- * @ingroup tripal_chado_v1.2_schema_api
- */
- function tripal_chado_chado_schema_v1_2_tripal_obo_temp() {
- $schema = array(
- 'table' => 'tripal_obo_temp',
- 'fields' => array(
- 'id' => array(
- 'type' => 'varchar',
- 'length' => '255',
- 'not null' => TRUE,
- ),
- 'stanza' => array(
- 'type' => 'text',
- 'not null' => TRUE,
- ),
- 'type' => array(
- 'type' => 'varchar',
- 'length' => '50',
- 'not null' => TRUE,
- ),
- ),
- 'indexes' => array(
- 'tripal_obo_temp_idx0' => array('id'),
- 'tripal_obo_temp_idx0' => array('type'),
- ),
- 'unique keys' => array(
- 'tripal_obo_temp_uq0' => array('id'),
- ),
- );
- return $schema;
- }
- /**
- * @file
- * Adds to the tripal schema description.
- *
- * This file contains hooks for specifying the natural diversity tables
- * when Chado v1.11 is installed. This is only useful for some specific
- * sites that required the ND tables before they were released. These
- * files should not be needed for most sites as the ND tables are now part
- * of Chado v1.2. However these hooks remain here for backwards compatibility.
- */
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment',
- 'fields' => array(
- 'nd_experiment_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_geolocation_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_id',
- ),
- 'foreign keys' => array(
- 'nd_geolocation' => array(
- 'table' => 'nd_geolocation',
- 'columns' => array(
- 'nd_geolocation_id' => 'nd_geolocation_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- 'nd_experiment_contact',
- 'nd_experiment_dbxref',
- 'nd_experiment_genotype',
- 'nd_experiment_phenotype',
- 'nd_experiment_project',
- 'nd_experiment_protocol',
- 'nd_experiment_pub',
- 'nd_experiment_stock',
- 'nd_experimentprop'
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_contact table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_contact() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_contact',
- 'fields' => array(
- 'nd_experiment_contact_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'contact_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_contact_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'contact' => array(
- 'table' => 'contact',
- 'columns' => array(
- 'contact_id' => 'contact_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_dbxref table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_dbxref() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_dbxref',
- 'fields' => array(
- 'nd_experiment_dbxref_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'dbxref_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_dbxref_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'dbxref' => array(
- 'table' => 'dbxref',
- 'columns' => array(
- 'dbxref_id' => 'dbxref_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_genotype table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_genotype() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_genotype',
- 'fields' => array(
- 'nd_experiment_genotype_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'genotype_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_genotype_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'genotype' => array(
- 'table' => 'genotype',
- 'columns' => array(
- 'genotype_id' => 'genotype_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_phenotype table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_phenotype() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_phenotype',
- 'fields' => array(
- 'nd_experiment_phenotype_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'phenotype_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_phenotype_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'phenotype' => array(
- 'table' => 'phenotype',
- 'columns' => array(
- 'phenotype_id' => 'phenotype_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_project table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_project() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_project',
- 'fields' => array(
- 'nd_experiment_project_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'project_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_project_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'project' => array(
- 'table' => 'project',
- 'columns' => array(
- 'project_id' => 'project_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_protocol table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_protocol() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_protocol',
- 'fields' => array(
- 'nd_experiment_protocol_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'protocol_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_protocol_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'protocol' => array(
- 'table' => 'protocol',
- 'columns' => array(
- 'protocol_id' => 'protocol_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_pub table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_pub() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_pub',
- 'fields' => array(
- 'nd_experiment_pub_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'pub_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_pub_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'pub' => array(
- 'table' => 'pub',
- 'columns' => array(
- 'pub_id' => 'pub_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_stock table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_stock() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_stock',
- 'fields' => array(
- 'nd_experiment_stock_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'stock_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_stock_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'stock' => array(
- 'table' => 'stock',
- 'columns' => array(
- 'stock_id' => 'stock_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- 'nd_experiment_stock_dbxref',
- 'nd_experiment_stockprop',
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_stockprop table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_stockprop() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_stockprop',
- 'fields' => array(
- 'nd_experiment_stockprop_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'nd_experiment_stock_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'value' => array(
- 'type' => 'varchar',
- ),
- 'rank' => array(
- 'type' => 'int',
- 'not null' => 1,
- 'default' => 1
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_stockprop_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment_stock' => array(
- 'table' => 'nd_experiment_stock',
- 'columns' => array(
- 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experiment_stock_dbxref table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experiment_stock_dbxref() {
- $description = array();
- $description = array(
- 'table' => 'nd_experiment_stock_dbxref',
- 'fields' => array(
- 'nd_experiment_stock_dbxref_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'nd_experiment_stock_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'dbxref_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experiment_stock_dbxref_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment_stock' => array(
- 'table' => 'nd_experiment_stock',
- 'columns' => array(
- 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
- ),
- ),
- 'dbxref' => array(
- 'table' => 'dbxref',
- 'columns' => array(
- 'dbxref_id' => 'dbxref_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_experimentprop table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_experimentprop() {
- $description = array();
- $description = array(
- 'table' => 'nd_experimentprop',
- 'fields' => array(
- 'nd_experimentprop_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'nd_experiment_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'value' => array(
- 'type' => 'varchar',
- ),
- 'rank' => array(
- 'type' => 'int',
- 'not null' => 1,
- 'default' => 1
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_experimentprop_id',
- ),
- 'foreign keys' => array(
- 'nd_experiment' => array(
- 'table' => 'nd_experiment',
- 'columns' => array(
- 'nd_experiment_id' => 'nd_experiment_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_geolocation table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_geolocation() {
- $description = array();
- $description = array(
- 'table' => 'nd_reagent',
- 'fields' => array(
- 'nd_geolocation_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'description' => array(
- 'type' => 'varchar'
- ),
- 'latitude' => array(
- 'type' => 'real',
- ),
- 'longitude' => array(
- 'type' => 'real',
- ),
- 'altitude' => array(
- 'type' => 'real',
- ),
- 'geodetic_datum' => array(
- 'type' => 'varchar',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_geolocation_id',
- ),
- 'referring_tables' => array(
- 'nd_experiment',
- 'nd_geolocationprop'
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_geolocationprop table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_geolocationprop() {
- $description = array();
- $description = array(
- 'table' => 'nd_geolocationprop',
- 'fields' => array(
- 'nd_geolocationprop_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'nd_geolocation_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'value' => array(
- 'type' => 'varchar',
- ),
- 'rank' => array(
- 'type' => 'int',
- 'not null' => 1,
- 'default' => 1
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_geolocationprop_id',
- ),
- 'foreign keys' => array(
- 'nd_geolocation' => array(
- 'table' => 'nd_geolocation',
- 'columns' => array(
- 'nd_geolocation_id' => 'nd_geolocation_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_protocol table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_protocol() {
- $description = array();
- $description = array(
- 'table' => 'nd_protocol',
- 'fields' => array(
- 'nd_protocol_id' => array(
- 'type' => 'serial',
- 'not null' => 1,
- ),
- 'name' => array(
- 'type' => 'varchar',
- 'not null' => 1,
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_protocol_id',
- ),
- 'referring_tables' => array(
- 'nd_experiment_protocol',
- 'nd_protocol_reagent',
- 'nd_protocolprop'
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_protocol_reagent table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_protocol_reagent() {
- $description = array();
- $description = array(
- 'table' => 'nd_protocol_reagent',
- 'fields' => array(
- 'nd_protocol_reagent_id' => array(
- 'type' => 'serial',
- 'not null' => 1,
- ),
- 'nd_protocol_id' => array(
- 'type' => 'int',
- 'not null' => 1,
- ),
- 'nd_reagent_id' => array(
- 'type' => 'int',
- 'not null' => 1,
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => 1,
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_protocol_reagent_id',
- ),
- 'foreign keys' => array(
- 'nd_protocol' => array(
- 'table' => 'nd_protocol',
- 'columns' => array(
- 'nd_protocol_id' => 'nd_protocol_id',
- ),
- ),
- 'nd_reagent' => array(
- 'table' => 'nd_reagent',
- 'columns' => array(
- 'nd_reagent_id' => 'nd_reagent_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_protocolprop table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_protocolprop() {
- $description = array();
- $description = array(
- 'table' => 'nd_protocolprop',
- 'fields' => array(
- 'nd_protocolprop_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'nd_protocol_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'value' => array(
- 'type' => 'varchar',
- ),
- 'rank' => array(
- 'type' => 'int',
- 'not null' => 1,
- 'default' => 1
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_protocolprop_id',
- ),
- 'foreign keys' => array(
- 'nd_protocol' => array(
- 'table' => 'nd_protocol',
- 'columns' => array(
- 'nd_protocol_id' => 'nd_protocol_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_reagent table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_reagent() {
- $description = array();
- $description = array(
- 'table' => 'nd_reagent',
- 'fields' => array(
- 'nd_reagent_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'name' => array(
- 'type' => 'varchar',
- 'length' => 80,
- 'not null' => TRUE
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'feature_id' => array(
- 'type' => 'int',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_reagent_id',
- ),
- 'foreign keys' => array(
- 'feature' => array(
- 'table' => 'feature',
- 'columns' => array(
- 'feature_id' => 'feature_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_reagent_relationship table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_reagent_relationship() {
- $description = array();
- $description = array(
- 'table' => 'nd_reagent_relationship',
- 'fields' => array(
- 'nd_reagent_relationship_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'subject_reagent_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'object_reagent_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_reagent_relationship_id',
- ),
- 'foreign keys' => array(
- 'nd_reagent' => array(
- 'table' => 'feature',
- 'columns' => array(
- 'subject_reagent_id' => 'nd_reagent_id',
- 'object_reagent_id' => 'nd_reagent_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- );
- return $description;
- }
- /**
- * Implements hook_chado_schema_v1_11_table()
- *
- * Purpose: To add descriptions and foreign keys to default table description
- * Note: This array will be merged with the array from all other implementations
- *
- * @return
- * Array describing the nd_reagentprop table
- *
- * @ingroup tripal_schema_api
- */
- function tripal_chado_chado_schema_v1_11_nd_reagentprop() {
- $description = array();
- $description = array(
- 'table' => 'nd_reagentprop',
- 'fields' => array(
- 'nd_reagentprop_id' => array(
- 'type' => 'serial',
- 'not null' => '1',
- ),
- 'nd_reagent_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'type_id' => array(
- 'type' => 'int',
- 'not null' => '1',
- ),
- 'value' => array(
- 'type' => 'varchar',
- ),
- 'rank' => array(
- 'type' => 'int',
- 'not null' => 1,
- 'default' => 1
- ),
- ),
- 'primary key' => array(
- '0' => 'nd_reagentprop_id',
- ),
- 'foreign keys' => array(
- 'nd_reagent' => array(
- 'table' => 'nd_reagent',
- 'columns' => array(
- 'nd_reagent_id' => 'nd_reagent_id',
- ),
- ),
- 'cvterm' => array(
- 'table' => 'cvterm',
- 'columns' => array(
- 'type_id' => 'cvterm_id',
- ),
- ),
- ),
- 'referring_tables' => array(
- ),
- );
- return $description;
- }
|