Tripal v1.0 (6.x-1.0)
tripal_core.schema_v1.2.api.inc
Go to the documentation of this file.
00001 <?php
00002 /* @file: This file contains default schema definitions for all chado v1.2 tables
00003  *        to be used by other function. Specifically these functions are used
00004  *        by the tripal_core select/insert/update API functions and by
00005  *        the Tripal Views module.
00006  *
00007  *        These schema definitions can be augmented by another modules
00008  *        (specifically to add missing definitions) by implementing
00009  *        hook_chado_schema_v1_2_<table name>().
00010  *
00011  * @defgroup tripal_schema_v1_2_api Chado v1.2 Schema API
00012  * @ingroup tripal_core_api
00013  * @{
00014  * Provides an application programming interface (API) for describing Chado tables.
00015  * This API consists of a set of functions, one for each table in Chado.  Each
00016  * function simply returns a Drupal style array that defines the table.
00017  *
00018  * Because Drupal 6 does not handle foreign key (FK) relationships, however FK 
00019  * relationships are needed to for Tripal Views.  Therefore, FK relationships
00020  * have been added to the schema defintitions below.
00021  *
00022  * The functions provided in this documentation should not be called as is, but if you need
00023  * the Drupal-style array definition for any table, use the following function
00024  * call:
00025  *
00026  *   $table_desc = tripal_core_get_chado_table_schema($table)
00027  *
00028  * where the variable $table contains the name of the table you want to
00029  * retireve.  The tripal_core_get_chado_table_schema function determines the appropriate version of 
00030  * Chado and uses the Drupal hook infrastructure to call the appropriate 
00031  * hook function to retrieve the table schema.
00032  *
00033  * @}
00034  */
00035 
00049 function tripal_core_chado_schema_v1_2_acquisition() {
00050   $description =  array(
00051     'description' => 'TODO: please describe this table!',
00052     'fields' => array(
00053       'acquisition_id' => array(
00054         'description' => 'TODO: please describe this field!',
00055         'type' => 'serial',
00056         'not null' => TRUE,
00057       ),
00058       'assay_id' => array(
00059         'description' => 'TODO: please describe this field!',
00060         'type' => 'int',
00061         'not null' => TRUE,
00062       ),
00063       'protocol_id' => array(
00064         'description' => 'TODO: please describe this field!',
00065         'type' => 'int',
00066         'not null' => FALSE,
00067       ),
00068       'channel_id' => array(
00069         'description' => 'TODO: please describe this field!',
00070         'type' => 'int',
00071         'not null' => FALSE,
00072       ),
00073       'acquisitiondate' => array(
00074         'description' => 'TODO: please describe this field!',
00075         'type' => 'datetime',
00076         'not null' => FALSE,
00077         'default' => 'ow(',
00078       ),
00079       'name' => array(
00080         'description' => 'TODO: please describe this field!',
00081         'type' => 'text',
00082         'not null' => FALSE,
00083       ),
00084       'uri' => array(
00085         'description' => 'TODO: please describe this field!',
00086         'type' => 'text',
00087         'not null' => FALSE,
00088       ),
00089     ),
00090     'primary key' => array(
00091       0 => 'acquisition_id',
00092     ),
00093     'unique keys' => array(
00094       'acquisition_c1' => array(
00095         0 => 'name',
00096       ),
00097     ),
00098     'indexes' => array(
00099       'acquisition_idx1' => array(
00100         0 => 'assay_id',
00101       ),
00102       'acquisition_idx2' => array(
00103         0 => 'protocol_id',
00104       ),
00105       'acquisition_idx3' => array(
00106         0 => 'channel_id',
00107       ),
00108     ),
00109     'foreign keys' => array(
00110       'protocol' => array(
00111         'table' => 'protocol',
00112         'columns' => array(
00113           'protocol_id' => 'protocol_id',
00114         ),
00115       ),
00116       'assay' => array(
00117         'table' => 'assay',
00118         'columns' => array(
00119           'assay_id' => 'assay_id',
00120         ),
00121       ),
00122       'channel' => array(
00123         'table' => 'channel',
00124         'columns' => array(
00125           'channel_id' => 'channel_id',
00126         ),
00127       ),
00128     ),
00129     'table' => 'acquisition',
00130     'referring_tables' => array(
00131       0 => 'acquisition_relationship',
00132       2 => 'acquisitionprop',
00133       3 => 'quantification',
00134     ),
00135   );
00136   return $description;
00137 }
00151 function tripal_core_chado_schema_v1_2_acquisition_relationship() {
00152   $description =  array(
00153     'description' => 'TODO: please describe this table!',
00154     'fields' => array(
00155       'acquisition_relationship_id' => array(
00156         'description' => 'TODO: please describe this field!',
00157         'type' => 'serial',
00158         'not null' => TRUE,
00159       ),
00160       'subject_id' => array(
00161         'description' => 'TODO: please describe this field!',
00162         'type' => 'int',
00163         'not null' => TRUE,
00164       ),
00165       'type_id' => array(
00166         'description' => 'TODO: please describe this field!',
00167         'type' => 'int',
00168         'not null' => TRUE,
00169       ),
00170       'object_id' => array(
00171         'description' => 'TODO: please describe this field!',
00172         'type' => 'int',
00173         'not null' => TRUE,
00174       ),
00175       'value' => array(
00176         'description' => 'TODO: please describe this field!',
00177         'type' => 'text',
00178         'not null' => FALSE,
00179       ),
00180       'rank' => array(
00181         'description' => 'TODO: please describe this field!',
00182         'type' => 'int',
00183         'not null' => TRUE,
00184         'default' => 0,
00185       ),
00186     ),
00187     'primary key' => array(
00188       0 => 'acquisition_relationship_id',
00189     ),
00190     'unique keys' => array(
00191       'acquisition_relationship_c1' => array(
00192         0 => 'subject_id',
00193         1 => 'object_id',
00194         2 => 'type_id',
00195         3 => 'rank',
00196       ),
00197     ),
00198     'indexes' => array(
00199       'acquisition_relationship_idx1' => array(
00200         0 => 'subject_id',
00201       ),
00202       'acquisition_relationship_idx2' => array(
00203         0 => 'type_id',
00204       ),
00205       'acquisition_relationship_idx3' => array(
00206         0 => 'object_id',
00207       ),
00208     ),
00209     'foreign keys' => array(
00210       'cvterm' => array(
00211         'table' => 'cvterm',
00212         'columns' => array(
00213           'type_id' => 'cvterm_id',
00214         ),
00215       ),
00216       'acquisition' => array(
00217         'table' => 'acquisition',
00218         'columns' => array(
00219           'subject_id' => 'acquisition_id',
00220           'object_id' => 'acquisition_id',
00221         ),
00222       ),
00223     ),
00224     'table' => 'acquisition_relationship',
00225     'referring_tables' => NULL,
00226   );
00227   return $description;
00228 }
00242 function tripal_core_chado_schema_v1_2_acquisitionprop() {
00243   $description =  array(
00244     'description' => 'TODO: please describe this table!',
00245     'fields' => array(
00246       'acquisitionprop_id' => array(
00247         'description' => 'TODO: please describe this field!',
00248         'type' => 'serial',
00249         'not null' => TRUE,
00250       ),
00251       'acquisition_id' => array(
00252         'description' => 'TODO: please describe this field!',
00253         'type' => 'int',
00254         'not null' => TRUE,
00255       ),
00256       'type_id' => array(
00257         'description' => 'TODO: please describe this field!',
00258         'type' => 'int',
00259         'not null' => TRUE,
00260       ),
00261       'value' => array(
00262         'description' => 'TODO: please describe this field!',
00263         'type' => 'text',
00264         'not null' => FALSE,
00265       ),
00266       'rank' => array(
00267         'description' => 'TODO: please describe this field!',
00268         'type' => 'int',
00269         'not null' => TRUE,
00270         'default' => 0,
00271       ),
00272     ),
00273     'primary key' => array(
00274       0 => 'acquisitionprop_id',
00275     ),
00276     'unique keys' => array(
00277       'acquisitionprop_c1' => array(
00278         0 => 'acquisition_id',
00279         1 => 'type_id',
00280         2 => 'rank',
00281       ),
00282     ),
00283     'indexes' => array(
00284       'acquisitionprop_idx1' => array(
00285         0 => 'acquisition_id',
00286       ),
00287       'acquisitionprop_idx2' => array(
00288         0 => 'type_id',
00289       ),
00290     ),
00291     'foreign keys' => array(
00292       'cvterm' => array(
00293         'table' => 'cvterm',
00294         'columns' => array(
00295           'type_id' => 'cvterm_id',
00296         ),
00297       ),
00298       'acquisition' => array(
00299         'table' => 'acquisition',
00300         'columns' => array(
00301           'acquisition_id' => 'acquisition_id',
00302         ),
00303       ),
00304     ),
00305     'table' => 'acquisitionprop',
00306     'referring_tables' => NULL,
00307   );
00308   return $description;
00309 }
00323 function tripal_core_chado_schema_v1_2_analysis() {
00324   $description =  array(
00325     'referring_tables' => array(
00326       0 => 'analysisfeature',
00327       1 => 'analysisprop',
00328       2 => 'phylotree',
00329       3 => 'quantification',
00330     ),
00331     'description' => 'TODO: please describe this table!',
00332     'fields' => array(
00333       'analysis_id' => array(
00334         'description' => 'TODO: please describe this field!',
00335         'type' => 'serial',
00336         'not null' => TRUE,
00337       ),
00338       'name' => array(
00339         'description' => 'TODO: please describe this field!',
00340         'type' => 'varchar',
00341         'length' => '255',
00342         'not null' => FALSE,
00343       ),
00344       'description' => array(
00345         'description' => 'TODO: please describe this field!',
00346         'type' => 'text',
00347         'not null' => FALSE,
00348       ),
00349       'program' => array(
00350         'description' => 'TODO: please describe this field!',
00351         'type' => 'varchar',
00352         'length' => '255',
00353         'not null' => TRUE,
00354       ),
00355       'programversion' => array(
00356         'description' => 'TODO: please describe this field!',
00357         'type' => 'varchar',
00358         'length' => '255',
00359         'not null' => TRUE,
00360       ),
00361       'algorithm' => array(
00362         'description' => 'TODO: please describe this field!',
00363         'type' => 'varchar',
00364         'length' => '255',
00365         'not null' => FALSE,
00366       ),
00367       'sourcename' => array(
00368         'description' => 'TODO: please describe this field!',
00369         'type' => 'varchar',
00370         'length' => '255',
00371         'not null' => FALSE,
00372       ),
00373       'sourceversion' => array(
00374         'description' => 'TODO: please describe this field!',
00375         'type' => 'varchar',
00376         'length' => '255',
00377         'not null' => FALSE,
00378       ),
00379       'sourceuri' => array(
00380         'description' => 'TODO: please describe this field!',
00381         'type' => 'text',
00382         'not null' => FALSE,
00383       ),
00384       'timeexecuted' => array(
00385         'description' => 'TODO: please describe this field!',
00386         'type' => 'datetime',
00387         'not null' => TRUE,
00388         'default' => 'ow(',
00389       ),
00390     ),
00391     'primary key' => array(
00392       0 => 'analysis_id',
00393     ),
00394     'unique keys' => array(
00395       'analysis_c1' => array(
00396         0 => 'program',
00397         1 => 'programversion',
00398         2 => 'sourcename',
00399       ),
00400     ),
00401     'foreign keys' => array(
00402     ),
00403     'table' => 'analysis',
00404   );
00405   return $description;
00406 }
00420 function tripal_core_chado_schema_v1_2_analysisfeature() {
00421   $description =  array(
00422     'description' => 'TODO: please describe this table!',
00423     'fields' => array(
00424       'analysisfeature_id' => array(
00425         'description' => 'TODO: please describe this field!',
00426         'type' => 'serial',
00427         'not null' => TRUE,
00428       ),
00429       'feature_id' => array(
00430         'description' => 'TODO: please describe this field!',
00431         'type' => 'int',
00432         'not null' => TRUE,
00433       ),
00434       'analysis_id' => array(
00435         'description' => 'TODO: please describe this field!',
00436         'type' => 'int',
00437         'not null' => TRUE,
00438       ),
00439       'rawscore' => array(
00440         'description' => 'TODO: please describe this field!',
00441         'type' => 'float',
00442         'size' => 'big',
00443         'not null' => FALSE,
00444       ),
00445       'normscore' => array(
00446         'description' => 'TODO: please describe this field!',
00447         'type' => 'float',
00448         'size' => 'big',
00449         'not null' => FALSE,
00450       ),
00451       'significance' => array(
00452         'description' => 'TODO: please describe this field!',
00453         'type' => 'float',
00454         'size' => 'big',
00455         'not null' => FALSE,
00456       ),
00457       'identity' => array(
00458         'description' => 'TODO: please describe this field!',
00459         'type' => 'float',
00460         'size' => 'big',
00461         'not null' => FALSE,
00462       ),
00463     ),
00464     'primary key' => array(
00465       0 => 'analysisfeature_id',
00466     ),
00467     'unique keys' => array(
00468       'analysisfeature_c1' => array(
00469         0 => 'feature_id',
00470         1 => 'analysis_id',
00471       ),
00472     ),
00473     'indexes' => array(
00474       'analysisfeature_idx1' => array(
00475         0 => 'feature_id',
00476       ),
00477       'analysisfeature_idx2' => array(
00478         0 => 'analysis_id',
00479       ),
00480     ),
00481     'foreign keys' => array(
00482       'analysis' => array(
00483         'table' => 'analysis',
00484         'columns' => array(
00485           'analysis_id' => 'analysis_id',
00486         ),
00487       ),
00488       'feature' => array(
00489         'table' => 'feature',
00490         'columns' => array(
00491           'feature_id' => 'feature_id',
00492         ),
00493       ),
00494     ),
00495     'table' => 'analysisfeature',
00496     'referring_tables' => array(
00497       0 => 'analysisfeatureprop',
00498     ),
00499   );
00500   return $description;
00501 }
00515 function tripal_core_chado_schema_v1_2_analysisfeatureprop() {
00516   $description =  array(
00517     'description' => 'TODO: please describe this table!',
00518     'fields' => array(
00519       'analysisfeatureprop_id' => array(
00520         'description' => 'TODO: please describe this field!',
00521         'type' => 'serial',
00522         'not null' => TRUE,
00523       ),
00524       'analysisfeature_id' => array(
00525         'description' => 'TODO: please describe this field!',
00526         'type' => 'int',
00527         'not null' => TRUE,
00528       ),
00529       'type_id' => array(
00530         'description' => 'TODO: please describe this field!',
00531         'type' => 'int',
00532         'not null' => TRUE,
00533       ),
00534       'value' => array(
00535         'description' => 'TODO: please describe this field!',
00536         'type' => 'text',
00537         'not null' => FALSE,
00538       ),
00539       'rank' => array(
00540         'description' => 'TODO: please describe this field!',
00541         'type' => 'int',
00542         'not null' => TRUE,
00543       ),
00544     ),
00545     'primary key' => array(
00546       0 => 'analysisfeatureprop_id',
00547     ),
00548     'unique keys' => array(
00549       'analysisfeature_id_type_id_rank' => array(
00550         0 => 'analysisfeature_id',
00551         1 => 'type_id',
00552         2 => 'rank',
00553       ),
00554     ),
00555     'foreign keys' => array(
00556       'cvterm' => array(
00557         'table' => 'cvterm',
00558         'columns' => array(
00559           'type_id' => 'cvterm_id',
00560         ),
00561       ),
00562       'analysisfeature' => array(
00563         'table' => 'analysisfeature',
00564         'columns' => array(
00565           'analysisfeature_id' => 'analysisfeature_id',
00566         ),
00567       ),
00568     ),
00569     'table' => 'analysisfeatureprop',
00570     'referring_tables' => NULL,
00571   );
00572   return $description;
00573 }
00587 function tripal_core_chado_schema_v1_2_analysisprop() {
00588   $description =  array(
00589     'description' => 'TODO: please describe this table!',
00590     'fields' => array(
00591       'analysisprop_id' => array(
00592         'description' => 'TODO: please describe this field!',
00593         'type' => 'serial',
00594         'not null' => TRUE,
00595       ),
00596       'analysis_id' => array(
00597         'description' => 'TODO: please describe this field!',
00598         'type' => 'int',
00599         'not null' => TRUE,
00600       ),
00601       'type_id' => array(
00602         'description' => 'TODO: please describe this field!',
00603         'type' => 'int',
00604         'not null' => TRUE,
00605       ),
00606       'value' => array(
00607         'description' => 'TODO: please describe this field!',
00608         'type' => 'text',
00609         'not null' => FALSE,
00610       ),
00611       'rank' => array(
00612         'description' => 'TODO: please describe this field!',
00613         'type' => 'int',
00614         'not null' => TRUE,
00615         'default' => 0,
00616       ),
00617     ),
00618     'primary key' => array(
00619       0 => 'analysisprop_id',
00620     ),
00621     'unique keys' => array(
00622       'analysisprop_c1' => array(
00623         0 => 'analysis_id',
00624         1 => 'type_id',
00625         2 => 'rank',
00626       ),
00627     ),
00628     'indexes' => array(
00629       'analysisprop_idx1' => array(
00630         0 => 'analysis_id',
00631       ),
00632       'analysisprop_idx2' => array(
00633         0 => 'type_id',
00634       ),
00635     ),
00636     'foreign keys' => array(
00637       'cvterm' => array(
00638         'table' => 'cvterm',
00639         'columns' => array(
00640           'type_id' => 'cvterm_id',
00641         ),
00642       ),
00643       'analysis' => array(
00644         'table' => 'analysis',
00645         'columns' => array(
00646           'analysis_id' => 'analysis_id',
00647         ),
00648       ),
00649     ),
00650     'table' => 'analysisprop',
00651     'referring_tables' => NULL,
00652   );
00653   return $description;
00654 }
00668 function tripal_core_chado_schema_v1_2_arraydesign() {
00669   $description =  array(
00670     'description' => 'TODO: please describe this table!',
00671     'fields' => array(
00672       'arraydesign_id' => array(
00673         'description' => 'TODO: please describe this field!',
00674         'type' => 'serial',
00675         'not null' => TRUE,
00676       ),
00677       'manufacturer_id' => array(
00678         'description' => 'TODO: please describe this field!',
00679         'type' => 'int',
00680         'not null' => TRUE,
00681       ),
00682       'platformtype_id' => array(
00683         'description' => 'TODO: please describe this field!',
00684         'type' => 'int',
00685         'not null' => TRUE,
00686       ),
00687       'substratetype_id' => array(
00688         'description' => 'TODO: please describe this field!',
00689         'type' => 'int',
00690         'not null' => FALSE,
00691       ),
00692       'protocol_id' => array(
00693         'description' => 'TODO: please describe this field!',
00694         'type' => 'int',
00695         'not null' => FALSE,
00696       ),
00697       'dbxref_id' => array(
00698         'description' => 'TODO: please describe this field!',
00699         'type' => 'int',
00700         'not null' => FALSE,
00701       ),
00702       'name' => array(
00703         'description' => 'TODO: please describe this field!',
00704         'type' => 'text',
00705         'not null' => TRUE,
00706       ),
00707       'version' => array(
00708         'description' => 'TODO: please describe this field!',
00709         'type' => 'text',
00710         'not null' => FALSE,
00711       ),
00712       'description' => array(
00713         'description' => 'TODO: please describe this field!',
00714         'type' => 'text',
00715         'not null' => FALSE,
00716       ),
00717       'array_dimensions' => array(
00718         'description' => 'TODO: please describe this field!',
00719         'type' => 'text',
00720         'not null' => FALSE,
00721       ),
00722       'element_dimensions' => array(
00723         'description' => 'TODO: please describe this field!',
00724         'type' => 'text',
00725         'not null' => FALSE,
00726       ),
00727       'num_of_elements' => array(
00728         'description' => 'TODO: please describe this field!',
00729         'type' => 'int',
00730         'not null' => FALSE,
00731       ),
00732       'num_array_columns' => array(
00733         'description' => 'TODO: please describe this field!',
00734         'type' => 'int',
00735         'not null' => FALSE,
00736       ),
00737       'num_array_rows' => array(
00738         'description' => 'TODO: please describe this field!',
00739         'type' => 'int',
00740         'not null' => FALSE,
00741       ),
00742       'num_grid_columns' => array(
00743         'description' => 'TODO: please describe this field!',
00744         'type' => 'int',
00745         'not null' => FALSE,
00746       ),
00747       'num_grid_rows' => array(
00748         'description' => 'TODO: please describe this field!',
00749         'type' => 'int',
00750         'not null' => FALSE,
00751       ),
00752       'num_sub_columns' => array(
00753         'description' => 'TODO: please describe this field!',
00754         'type' => 'int',
00755         'not null' => FALSE,
00756       ),
00757       'num_sub_rows' => array(
00758         'description' => 'TODO: please describe this field!',
00759         'type' => 'int',
00760         'not null' => FALSE,
00761       ),
00762     ),
00763     'primary key' => array(
00764       0 => 'arraydesign_id',
00765     ),
00766     'unique keys' => array(
00767       'arraydesign_c1' => array(
00768         0 => 'name',
00769       ),
00770     ),
00771     'indexes' => array(
00772       'arraydesign_idx1' => array(
00773         0 => 'manufacturer_id',
00774       ),
00775       'arraydesign_idx2' => array(
00776         0 => 'platformtype_id',
00777       ),
00778       'arraydesign_idx3' => array(
00779         0 => 'substratetype_id',
00780       ),
00781       'arraydesign_idx4' => array(
00782         0 => 'protocol_id',
00783       ),
00784       'arraydesign_idx5' => array(
00785         0 => 'dbxref_id',
00786       ),
00787     ),
00788     'foreign keys' => array(
00789       'cvterm' => array(
00790         'table' => 'cvterm',
00791         'columns' => array(
00792           'platformtype_id' => 'cvterm_id',
00793           'substratetype_id' => 'cvterm_id',
00794         ),
00795       ),
00796       'dbxref' => array(
00797         'table' => 'dbxref',
00798         'columns' => array(
00799           'dbxref_id' => 'dbxref_id',
00800         ),
00801       ),
00802       'contact' => array(
00803         'table' => 'contact',
00804         'columns' => array(
00805           'manufacturer_id' => 'contact_id',
00806         ),
00807       ),
00808       'protocol' => array(
00809         'table' => 'protocol',
00810         'columns' => array(
00811           'protocol_id' => 'protocol_id',
00812         ),
00813       ),
00814     ),
00815     'table' => 'arraydesign',
00816     'referring_tables' => array(
00817       0 => 'arraydesignprop',
00818       1 => 'assay',
00819       2 => 'element',
00820     ),
00821   );
00822   return $description;
00823 }
00837 function tripal_core_chado_schema_v1_2_arraydesignprop() {
00838   $description =  array(
00839     'description' => 'TODO: please describe this table!',
00840     'fields' => array(
00841       'arraydesignprop_id' => array(
00842         'description' => 'TODO: please describe this field!',
00843         'type' => 'serial',
00844         'not null' => TRUE,
00845       ),
00846       'arraydesign_id' => array(
00847         'description' => 'TODO: please describe this field!',
00848         'type' => 'int',
00849         'not null' => TRUE,
00850       ),
00851       'type_id' => array(
00852         'description' => 'TODO: please describe this field!',
00853         'type' => 'int',
00854         'not null' => TRUE,
00855       ),
00856       'value' => array(
00857         'description' => 'TODO: please describe this field!',
00858         'type' => 'text',
00859         'not null' => FALSE,
00860       ),
00861       'rank' => array(
00862         'description' => 'TODO: please describe this field!',
00863         'type' => 'int',
00864         'not null' => TRUE,
00865         'default' => 0,
00866       ),
00867     ),
00868     'primary key' => array(
00869       0 => 'arraydesignprop_id',
00870     ),
00871     'unique keys' => array(
00872       'arraydesignprop_c1' => array(
00873         0 => 'arraydesign_id',
00874         1 => 'type_id',
00875         2 => 'rank',
00876       ),
00877     ),
00878     'indexes' => array(
00879       'arraydesignprop_idx1' => array(
00880         0 => 'arraydesign_id',
00881       ),
00882       'arraydesignprop_idx2' => array(
00883         0 => 'type_id',
00884       ),
00885     ),
00886     'foreign keys' => array(
00887       'cvterm' => array(
00888         'table' => 'cvterm',
00889         'columns' => array(
00890           'type_id' => 'cvterm_id',
00891         ),
00892       ),
00893       'arraydesign' => array(
00894         'table' => 'arraydesign',
00895         'columns' => array(
00896           'arraydesign_id' => 'arraydesign_id',
00897         ),
00898       ),
00899     ),
00900     'table' => 'arraydesignprop',
00901     'referring_tables' => NULL,
00902   );
00903   return $description;
00904 }
00918 function tripal_core_chado_schema_v1_2_assay() {
00919   $description =  array(
00920     'description' => 'TODO: please describe this table!',
00921     'fields' => array(
00922       'assay_id' => array(
00923         'description' => 'TODO: please describe this field!',
00924         'type' => 'serial',
00925         'not null' => TRUE,
00926       ),
00927       'arraydesign_id' => array(
00928         'description' => 'TODO: please describe this field!',
00929         'type' => 'int',
00930         'not null' => TRUE,
00931       ),
00932       'protocol_id' => array(
00933         'description' => 'TODO: please describe this field!',
00934         'type' => 'int',
00935         'not null' => FALSE,
00936       ),
00937       'assaydate' => array(
00938         'description' => 'TODO: please describe this field!',
00939         'type' => 'datetime',
00940         'not null' => FALSE,
00941         'default' => 'ow(',
00942       ),
00943       'arrayidentifier' => array(
00944         'description' => 'TODO: please describe this field!',
00945         'type' => 'text',
00946         'not null' => FALSE,
00947       ),
00948       'arraybatchidentifier' => array(
00949         'description' => 'TODO: please describe this field!',
00950         'type' => 'text',
00951         'not null' => FALSE,
00952       ),
00953       'operator_id' => array(
00954         'description' => 'TODO: please describe this field!',
00955         'type' => 'int',
00956         'not null' => TRUE,
00957       ),
00958       'dbxref_id' => array(
00959         'description' => 'TODO: please describe this field!',
00960         'type' => 'int',
00961         'not null' => FALSE,
00962       ),
00963       'name' => array(
00964         'description' => 'TODO: please describe this field!',
00965         'type' => 'text',
00966         'not null' => FALSE,
00967       ),
00968       'description' => array(
00969         'description' => 'TODO: please describe this field!',
00970         'type' => 'text',
00971         'not null' => FALSE,
00972       ),
00973     ),
00974     'primary key' => array(
00975       0 => 'assay_id',
00976     ),
00977     'unique keys' => array(
00978       'assay_c1' => array(
00979         0 => 'name',
00980       ),
00981     ),
00982     'indexes' => array(
00983       'assay_idx1' => array(
00984         0 => 'arraydesign_id',
00985       ),
00986       'assay_idx2' => array(
00987         0 => 'protocol_id',
00988       ),
00989       'assay_idx3' => array(
00990         0 => 'operator_id',
00991       ),
00992       'assay_idx4' => array(
00993         0 => 'dbxref_id',
00994       ),
00995     ),
00996     'foreign keys' => array(
00997       'dbxref' => array(
00998         'table' => 'dbxref',
00999         'columns' => array(
01000           'dbxref_id' => 'dbxref_id',
01001         ),
01002       ),
01003       'contact' => array(
01004         'table' => 'contact',
01005         'columns' => array(
01006           'operator_id' => 'contact_id',
01007         ),
01008       ),
01009       'arraydesign' => array(
01010         'table' => 'arraydesign',
01011         'columns' => array(
01012           'arraydesign_id' => 'arraydesign_id',
01013         ),
01014       ),
01015       'protocol' => array(
01016         'table' => 'protocol',
01017         'columns' => array(
01018           'protocol_id' => 'protocol_id',
01019         ),
01020       ),
01021     ),
01022     'table' => 'assay',
01023     'referring_tables' => array(
01024       0 => 'acquisition',
01025       1 => 'assay_biomaterial',
01026       2 => 'assay_project',
01027       3 => 'assayprop',
01028       4 => 'control',
01029       5 => 'study_assay',
01030       6 => 'studyfactorvalue',
01031     ),
01032   );
01033   return $description;
01034 }
01048 function tripal_core_chado_schema_v1_2_assay_biomaterial() {
01049   $description =  array(
01050     'description' => 'TODO: please describe this table!',
01051     'fields' => array(
01052       'assay_biomaterial_id' => array(
01053         'description' => 'TODO: please describe this field!',
01054         'type' => 'serial',
01055         'not null' => TRUE,
01056       ),
01057       'assay_id' => array(
01058         'description' => 'TODO: please describe this field!',
01059         'type' => 'int',
01060         'not null' => TRUE,
01061       ),
01062       'biomaterial_id' => array(
01063         'description' => 'TODO: please describe this field!',
01064         'type' => 'int',
01065         'not null' => TRUE,
01066       ),
01067       'channel_id' => array(
01068         'description' => 'TODO: please describe this field!',
01069         'type' => 'int',
01070         'not null' => FALSE,
01071       ),
01072       'rank' => array(
01073         'description' => 'TODO: please describe this field!',
01074         'type' => 'int',
01075         'not null' => TRUE,
01076         'default' => 0,
01077       ),
01078     ),
01079     'primary key' => array(
01080       0 => 'assay_biomaterial_id',
01081     ),
01082     'unique keys' => array(
01083       'assay_biomaterial_c1' => array(
01084         0 => 'assay_id',
01085         1 => 'biomaterial_id',
01086         2 => 'channel_id',
01087         3 => 'rank',
01088       ),
01089     ),
01090     'indexes' => array(
01091       'assay_biomaterial_idx1' => array(
01092         0 => 'assay_id',
01093       ),
01094       'assay_biomaterial_idx2' => array(
01095         0 => 'biomaterial_id',
01096       ),
01097       'assay_biomaterial_idx3' => array(
01098         0 => 'channel_id',
01099       ),
01100     ),
01101     'foreign keys' => array(
01102       'assay' => array(
01103         'table' => 'assay',
01104         'columns' => array(
01105           'assay_id' => 'assay_id',
01106         ),
01107       ),
01108       'biomaterial' => array(
01109         'table' => 'biomaterial',
01110         'columns' => array(
01111           'biomaterial_id' => 'biomaterial_id',
01112         ),
01113       ),
01114       'channel' => array(
01115         'table' => 'channel',
01116         'columns' => array(
01117           'channel_id' => 'channel_id',
01118         ),
01119       ),
01120     ),
01121     'table' => 'assay_biomaterial',
01122     'referring_tables' => NULL,
01123   );
01124   return $description;
01125 }
01139 function tripal_core_chado_schema_v1_2_assay_project() {
01140   $description =  array(
01141     'description' => 'TODO: please describe this table!',
01142     'fields' => array(
01143       'assay_project_id' => array(
01144         'description' => 'TODO: please describe this field!',
01145         'type' => 'serial',
01146         'not null' => TRUE,
01147       ),
01148       'assay_id' => array(
01149         'description' => 'TODO: please describe this field!',
01150         'type' => 'int',
01151         'not null' => TRUE,
01152       ),
01153       'project_id' => array(
01154         'description' => 'TODO: please describe this field!',
01155         'type' => 'int',
01156         'not null' => TRUE,
01157       ),
01158     ),
01159     'primary key' => array(
01160       0 => 'assay_project_id',
01161     ),
01162     'unique keys' => array(
01163       'assay_project_c1' => array(
01164         0 => 'assay_id',
01165         1 => 'project_id',
01166       ),
01167     ),
01168     'indexes' => array(
01169       'assay_project_idx1' => array(
01170         0 => 'assay_id',
01171       ),
01172       'assay_project_idx2' => array(
01173         0 => 'project_id',
01174       ),
01175     ),
01176     'foreign keys' => array(
01177       'project' => array(
01178         'table' => 'project',
01179         'columns' => array(
01180           'project_id' => 'project_id',
01181         ),
01182       ),
01183       'assay' => array(
01184         'table' => 'assay',
01185         'columns' => array(
01186           'assay_id' => 'assay_id',
01187         ),
01188       ),
01189     ),
01190     'table' => 'assay_project',
01191     'referring_tables' => NULL,
01192   );
01193   return $description;
01194 }
01208 function tripal_core_chado_schema_v1_2_assayprop() {
01209   $description =  array(
01210     'description' => 'TODO: please describe this table!',
01211     'fields' => array(
01212       'assayprop_id' => array(
01213         'description' => 'TODO: please describe this field!',
01214         'type' => 'serial',
01215         'not null' => TRUE,
01216       ),
01217       'assay_id' => array(
01218         'description' => 'TODO: please describe this field!',
01219         'type' => 'int',
01220         'not null' => TRUE,
01221       ),
01222       'type_id' => array(
01223         'description' => 'TODO: please describe this field!',
01224         'type' => 'int',
01225         'not null' => TRUE,
01226       ),
01227       'value' => array(
01228         'description' => 'TODO: please describe this field!',
01229         'type' => 'text',
01230         'not null' => FALSE,
01231       ),
01232       'rank' => array(
01233         'description' => 'TODO: please describe this field!',
01234         'type' => 'int',
01235         'not null' => TRUE,
01236         'default' => 0,
01237       ),
01238     ),
01239     'primary key' => array(
01240       0 => 'assayprop_id',
01241     ),
01242     'unique keys' => array(
01243       'assayprop_c1' => array(
01244         0 => 'assay_id',
01245         1 => 'type_id',
01246         2 => 'rank',
01247       ),
01248     ),
01249     'indexes' => array(
01250       'assayprop_idx1' => array(
01251         0 => 'assay_id',
01252       ),
01253       'assayprop_idx2' => array(
01254         0 => 'type_id',
01255       ),
01256     ),
01257     'foreign keys' => array(
01258       'cvterm' => array(
01259         'table' => 'cvterm',
01260         'columns' => array(
01261           'type_id' => 'cvterm_id',
01262         ),
01263       ),
01264       'assay' => array(
01265         'table' => 'assay',
01266         'columns' => array(
01267           'assay_id' => 'assay_id',
01268         ),
01269       ),
01270     ),
01271     'table' => 'assayprop',
01272     'referring_tables' => NULL,
01273   );
01274   return $description;
01275 }
01289 function tripal_core_chado_schema_v1_2_biomaterial() {
01290   $description =  array(
01291     'description' => 'TODO: please describe this table!',
01292     'fields' => array(
01293       'biomaterial_id' => array(
01294         'description' => 'TODO: please describe this field!',
01295         'type' => 'serial',
01296         'not null' => TRUE,
01297       ),
01298       'taxon_id' => array(
01299         'description' => 'TODO: please describe this field!',
01300         'type' => 'int',
01301         'not null' => FALSE,
01302       ),
01303       'biosourceprovider_id' => array(
01304         'description' => 'TODO: please describe this field!',
01305         'type' => 'int',
01306         'not null' => FALSE,
01307       ),
01308       'dbxref_id' => array(
01309         'description' => 'TODO: please describe this field!',
01310         'type' => 'int',
01311         'not null' => FALSE,
01312       ),
01313       'name' => array(
01314         'description' => 'TODO: please describe this field!',
01315         'type' => 'text',
01316         'not null' => FALSE,
01317       ),
01318       'description' => array(
01319         'description' => 'TODO: please describe this field!',
01320         'type' => 'text',
01321         'not null' => FALSE,
01322       ),
01323     ),
01324     'primary key' => array(
01325       0 => 'biomaterial_id',
01326     ),
01327     'unique keys' => array(
01328       'biomaterial_c1' => array(
01329         0 => 'name',
01330       ),
01331     ),
01332     'indexes' => array(
01333       'biomaterial_idx1' => array(
01334         0 => 'taxon_id',
01335       ),
01336       'biomaterial_idx2' => array(
01337         0 => 'biosourceprovider_id',
01338       ),
01339       'biomaterial_idx3' => array(
01340         0 => 'dbxref_id',
01341       ),
01342     ),
01343     'foreign keys' => array(
01344       'organism' => array(
01345         'table' => 'organism',
01346         'columns' => array(
01347           'taxon_id' => 'organism_id',
01348         ),
01349       ),
01350       'dbxref' => array(
01351         'table' => 'dbxref',
01352         'columns' => array(
01353           'dbxref_id' => 'dbxref_id',
01354         ),
01355       ),
01356       'contact' => array(
01357         'table' => 'contact',
01358         'columns' => array(
01359           'biosourceprovider_id' => 'contact_id',
01360         ),
01361       ),
01362     ),
01363     'table' => 'biomaterial',
01364     'referring_tables' => array(
01365       0 => 'assay_biomaterial',
01366       1 => 'biomaterial_dbxref',
01367       2 => 'biomaterial_relationship',
01368       4 => 'biomaterial_treatment',
01369       5 => 'biomaterialprop',
01370       6 => 'treatment',
01371     ),
01372   );
01373   return $description;
01374 }
01388 function tripal_core_chado_schema_v1_2_biomaterial_dbxref() {
01389   $description =  array(
01390     'description' => 'TODO: please describe this table!',
01391     'fields' => array(
01392       'biomaterial_dbxref_id' => array(
01393         'description' => 'TODO: please describe this field!',
01394         'type' => 'serial',
01395         'not null' => TRUE,
01396       ),
01397       'biomaterial_id' => array(
01398         'description' => 'TODO: please describe this field!',
01399         'type' => 'int',
01400         'not null' => TRUE,
01401       ),
01402       'dbxref_id' => array(
01403         'description' => 'TODO: please describe this field!',
01404         'type' => 'int',
01405         'not null' => TRUE,
01406       ),
01407     ),
01408     'primary key' => array(
01409       0 => 'biomaterial_dbxref_id',
01410     ),
01411     'unique keys' => array(
01412       'biomaterial_dbxref_c1' => array(
01413         0 => 'biomaterial_id',
01414         1 => 'dbxref_id',
01415       ),
01416     ),
01417     'indexes' => array(
01418       'biomaterial_dbxref_idx1' => array(
01419         0 => 'biomaterial_id',
01420       ),
01421       'biomaterial_dbxref_idx2' => array(
01422         0 => 'dbxref_id',
01423       ),
01424     ),
01425     'foreign keys' => array(
01426       'dbxref' => array(
01427         'table' => 'dbxref',
01428         'columns' => array(
01429           'dbxref_id' => 'dbxref_id',
01430         ),
01431       ),
01432       'biomaterial' => array(
01433         'table' => 'biomaterial',
01434         'columns' => array(
01435           'biomaterial_id' => 'biomaterial_id',
01436         ),
01437       ),
01438     ),
01439     'table' => 'biomaterial_dbxref',
01440     'referring_tables' => NULL,
01441   );
01442   return $description;
01443 }
01457 function tripal_core_chado_schema_v1_2_biomaterial_relationship() {
01458   $description =  array(
01459     'description' => 'TODO: please describe this table!',
01460     'fields' => array(
01461       'biomaterial_relationship_id' => array(
01462         'description' => 'TODO: please describe this field!',
01463         'type' => 'serial',
01464         'not null' => TRUE,
01465       ),
01466       'subject_id' => array(
01467         'description' => 'TODO: please describe this field!',
01468         'type' => 'int',
01469         'not null' => TRUE,
01470       ),
01471       'type_id' => array(
01472         'description' => 'TODO: please describe this field!',
01473         'type' => 'int',
01474         'not null' => TRUE,
01475       ),
01476       'object_id' => array(
01477         'description' => 'TODO: please describe this field!',
01478         'type' => 'int',
01479         'not null' => TRUE,
01480       ),
01481     ),
01482     'primary key' => array(
01483       0 => 'biomaterial_relationship_id',
01484     ),
01485     'unique keys' => array(
01486       'biomaterial_relationship_c1' => array(
01487         0 => 'subject_id',
01488         1 => 'object_id',
01489         2 => 'type_id',
01490       ),
01491     ),
01492     'indexes' => array(
01493       'biomaterial_relationship_idx1' => array(
01494         0 => 'subject_id',
01495       ),
01496       'biomaterial_relationship_idx2' => array(
01497         0 => 'object_id',
01498       ),
01499       'biomaterial_relationship_idx3' => array(
01500         0 => 'type_id',
01501       ),
01502     ),
01503     'foreign keys' => array(
01504       'cvterm' => array(
01505         'table' => 'cvterm',
01506         'columns' => array(
01507           'type_id' => 'cvterm_id',
01508         ),
01509       ),
01510       'biomaterial' => array(
01511         'table' => 'biomaterial',
01512         'columns' => array(
01513           'subject_id' => 'biomaterial_id',
01514           'object_id' => 'biomaterial_id',
01515         ),
01516       ),
01517     ),
01518     'table' => 'biomaterial_relationship',
01519     'referring_tables' => NULL,
01520   );
01521   return $description;
01522 }
01536 function tripal_core_chado_schema_v1_2_biomaterial_treatment() {
01537   $description =  array(
01538     'description' => 'TODO: please describe this table!',
01539     'fields' => array(
01540       'biomaterial_treatment_id' => array(
01541         'description' => 'TODO: please describe this field!',
01542         'type' => 'serial',
01543         'not null' => TRUE,
01544       ),
01545       'biomaterial_id' => array(
01546         'description' => 'TODO: please describe this field!',
01547         'type' => 'int',
01548         'not null' => TRUE,
01549       ),
01550       'treatment_id' => array(
01551         'description' => 'TODO: please describe this field!',
01552         'type' => 'int',
01553         'not null' => TRUE,
01554       ),
01555       'unittype_id' => array(
01556         'description' => 'TODO: please describe this field!',
01557         'type' => 'int',
01558         'not null' => FALSE,
01559       ),
01560       'value' => array(
01561         'description' => 'TODO: please describe this field!',
01562         'type' => 'float',
01563         'not null' => FALSE,
01564       ),
01565       'rank' => array(
01566         'description' => 'TODO: please describe this field!',
01567         'type' => 'int',
01568         'not null' => TRUE,
01569         'default' => 0,
01570       ),
01571     ),
01572     'primary key' => array(
01573       0 => 'biomaterial_treatment_id',
01574     ),
01575     'unique keys' => array(
01576       'biomaterial_treatment_c1' => array(
01577         0 => 'biomaterial_id',
01578         1 => 'treatment_id',
01579       ),
01580     ),
01581     'indexes' => array(
01582       'biomaterial_treatment_idx1' => array(
01583         0 => 'biomaterial_id',
01584       ),
01585       'biomaterial_treatment_idx2' => array(
01586         0 => 'treatment_id',
01587       ),
01588       'biomaterial_treatment_idx3' => array(
01589         0 => 'unittype_id',
01590       ),
01591     ),
01592     'foreign keys' => array(
01593       'cvterm' => array(
01594         'table' => 'cvterm',
01595         'columns' => array(
01596           'unittype_id' => 'cvterm_id',
01597         ),
01598       ),
01599       'biomaterial' => array(
01600         'table' => 'biomaterial',
01601         'columns' => array(
01602           'biomaterial_id' => 'biomaterial_id',
01603         ),
01604       ),
01605       'treatment' => array(
01606         'table' => 'treatment',
01607         'columns' => array(
01608           'treatment_id' => 'treatment_id',
01609         ),
01610       ),
01611     ),
01612     'table' => 'biomaterial_treatment',
01613     'referring_tables' => NULL,
01614   );
01615   return $description;
01616 }
01630 function tripal_core_chado_schema_v1_2_biomaterialprop() {
01631   $description =  array(
01632     'description' => 'TODO: please describe this table!',
01633     'fields' => array(
01634       'biomaterialprop_id' => array(
01635         'description' => 'TODO: please describe this field!',
01636         'type' => 'serial',
01637         'not null' => TRUE,
01638       ),
01639       'biomaterial_id' => array(
01640         'description' => 'TODO: please describe this field!',
01641         'type' => 'int',
01642         'not null' => TRUE,
01643       ),
01644       'type_id' => array(
01645         'description' => 'TODO: please describe this field!',
01646         'type' => 'int',
01647         'not null' => TRUE,
01648       ),
01649       'value' => array(
01650         'description' => 'TODO: please describe this field!',
01651         'type' => 'text',
01652         'not null' => FALSE,
01653       ),
01654       'rank' => array(
01655         'description' => 'TODO: please describe this field!',
01656         'type' => 'int',
01657         'not null' => TRUE,
01658         'default' => 0,
01659       ),
01660     ),
01661     'primary key' => array(
01662       0 => 'biomaterialprop_id',
01663     ),
01664     'unique keys' => array(
01665       'biomaterialprop_c1' => array(
01666         0 => 'biomaterial_id',
01667         1 => 'type_id',
01668         2 => 'rank',
01669       ),
01670     ),
01671     'indexes' => array(
01672       'biomaterialprop_idx1' => array(
01673         0 => 'biomaterial_id',
01674       ),
01675       'biomaterialprop_idx2' => array(
01676         0 => 'type_id',
01677       ),
01678     ),
01679     'foreign keys' => array(
01680       'cvterm' => array(
01681         'table' => 'cvterm',
01682         'columns' => array(
01683           'type_id' => 'cvterm_id',
01684         ),
01685       ),
01686       'biomaterial' => array(
01687         'table' => 'biomaterial',
01688         'columns' => array(
01689           'biomaterial_id' => 'biomaterial_id',
01690         ),
01691       ),
01692     ),
01693     'table' => 'biomaterialprop',
01694     'referring_tables' => NULL,
01695   );
01696   return $description;
01697 }
01698 
01712 function tripal_core_chado_schema_v1_2_cell_line() {
01713   $description =  array(
01714     'description' => 'TODO: please describe this table!',
01715     'fields' => array(
01716       'cell_line_id' => array(
01717         'description' => 'TODO: please describe this field!',
01718         'type' => 'serial',
01719         'not null' => TRUE,
01720       ),
01721       'name' => array(
01722         'description' => 'TODO: please describe this field!',
01723         'type' => 'varchar',
01724         'length' => '255',
01725         'not null' => FALSE,
01726       ),
01727       'uniquename' => array(
01728         'description' => 'TODO: please describe this field!',
01729         'type' => 'varchar',
01730         'length' => '255',
01731         'not null' => TRUE,
01732       ),
01733       'organism_id' => array(
01734         'description' => 'TODO: please describe this field!',
01735         'type' => 'int',
01736         'not null' => TRUE,
01737       ),
01738       'timeaccessioned' => array(
01739         'description' => 'TODO: please describe this field!',
01740         'type' => 'datetime',
01741         'not null' => TRUE,
01742         'default' => 'ow(',
01743       ),
01744       'timelastmodified' => array(
01745         'description' => 'TODO: please describe this field!',
01746         'type' => 'datetime',
01747         'not null' => TRUE,
01748         'default' => 'ow(',
01749       ),
01750     ),
01751     'primary key' => array(
01752       0 => 'cell_line_id',
01753     ),
01754     'unique keys' => array(
01755       'cell_line_c1' => array(
01756         0 => 'uniquename',
01757         1 => 'organism_id',
01758       ),
01759     ),
01760     'foreign keys' => array(
01761       'organism' => array(
01762         'table' => 'organism',
01763         'columns' => array(
01764           'organism_id' => 'organism_id',
01765         ),
01766       ),
01767     ),
01768     'table' => 'cell_line',
01769     'referring_tables' => array(
01770       0 => 'cell_line_cvterm',
01771       1 => 'cell_line_dbxref',
01772       2 => 'cell_line_feature',
01773       3 => 'cell_line_library',
01774       4 => 'cell_line_pub',
01775       5 => 'cell_line_relationship',
01776       7 => 'cell_line_synonym',
01777       8 => 'cell_lineprop',
01778     ),
01779   );
01780   return $description;
01781 }
01795 function tripal_core_chado_schema_v1_2_cell_line_cvterm() {
01796   $description =  array(
01797     'description' => 'TODO: please describe this table!',
01798     'fields' => array(
01799       'cell_line_cvterm_id' => array(
01800         'description' => 'TODO: please describe this field!',
01801         'type' => 'serial',
01802         'not null' => TRUE,
01803       ),
01804       'cell_line_id' => array(
01805         'description' => 'TODO: please describe this field!',
01806         'type' => 'int',
01807         'not null' => TRUE,
01808       ),
01809       'cvterm_id' => array(
01810         'description' => 'TODO: please describe this field!',
01811         'type' => 'int',
01812         'not null' => TRUE,
01813       ),
01814       'pub_id' => array(
01815         'description' => 'TODO: please describe this field!',
01816         'type' => 'int',
01817         'not null' => TRUE,
01818       ),
01819       'rank' => array(
01820         'description' => 'TODO: please describe this field!',
01821         'type' => 'int',
01822         'not null' => TRUE,
01823         'default' => 0,
01824       ),
01825     ),
01826     'primary key' => array(
01827       0 => 'cell_line_cvterm_id',
01828     ),
01829     'unique keys' => array(
01830       'cell_line_cvterm_c1' => array(
01831         0 => 'cell_line_id',
01832         1 => 'cvterm_id',
01833         2 => 'pub_id',
01834         3 => 'rank',
01835       ),
01836     ),
01837     'foreign keys' => array(
01838       'cvterm' => array(
01839         'table' => 'cvterm',
01840         'columns' => array(
01841           'cvterm_id' => 'cvterm_id',
01842         ),
01843       ),
01844       'pub' => array(
01845         'table' => 'pub',
01846         'columns' => array(
01847           'pub_id' => 'pub_id',
01848         ),
01849       ),
01850       'cell_line' => array(
01851         'table' => 'cell_line',
01852         'columns' => array(
01853           'cell_line_id' => 'cell_line_id',
01854         ),
01855       ),
01856     ),
01857     'table' => 'cell_line_cvterm',
01858     'referring_tables' => array(
01859       0 => 'cell_line_cvtermprop',
01860     ),
01861   );
01862   return $description;
01863 }
01877 function tripal_core_chado_schema_v1_2_cell_line_cvtermprop() {
01878   $description =  array(
01879     'description' => 'TODO: please describe this table!',
01880     'fields' => array(
01881       'cell_line_cvtermprop_id' => array(
01882         'description' => 'TODO: please describe this field!',
01883         'type' => 'serial',
01884         'not null' => TRUE,
01885       ),
01886       'cell_line_cvterm_id' => array(
01887         'description' => 'TODO: please describe this field!',
01888         'type' => 'int',
01889         'not null' => TRUE,
01890       ),
01891       'type_id' => array(
01892         'description' => 'TODO: please describe this field!',
01893         'type' => 'int',
01894         'not null' => TRUE,
01895       ),
01896       'value' => array(
01897         'description' => 'TODO: please describe this field!',
01898         'type' => 'text',
01899         'not null' => FALSE,
01900       ),
01901       'rank' => array(
01902         'description' => 'TODO: please describe this field!',
01903         'type' => 'int',
01904         'not null' => TRUE,
01905         'default' => 0,
01906       ),
01907     ),
01908     'primary key' => array(
01909       0 => 'cell_line_cvtermprop_id',
01910     ),
01911     'unique keys' => array(
01912       'cell_line_cvtermprop_c1' => array(
01913         0 => 'cell_line_cvterm_id',
01914         1 => 'type_id',
01915         2 => 'rank',
01916       ),
01917     ),
01918     'foreign keys' => array(
01919       'cvterm' => array(
01920         'table' => 'cvterm',
01921         'columns' => array(
01922           'type_id' => 'cvterm_id',
01923         ),
01924       ),
01925       'cell_line_cvterm' => array(
01926         'table' => 'cell_line_cvterm',
01927         'columns' => array(
01928           'cell_line_cvterm_id' => 'cell_line_cvterm_id',
01929         ),
01930       ),
01931     ),
01932     'table' => 'cell_line_cvtermprop',
01933     'referring_tables' => NULL,
01934   );
01935   return $description;
01936 }
01950 function tripal_core_chado_schema_v1_2_cell_line_dbxref() {
01951   $description =  array(
01952     'description' => 'TODO: please describe this table!',
01953     'fields' => array(
01954       'cell_line_dbxref_id' => array(
01955         'description' => 'TODO: please describe this field!',
01956         'type' => 'serial',
01957         'not null' => TRUE,
01958       ),
01959       'cell_line_id' => array(
01960         'description' => 'TODO: please describe this field!',
01961         'type' => 'int',
01962         'not null' => TRUE,
01963       ),
01964       'dbxref_id' => array(
01965         'description' => 'TODO: please describe this field!',
01966         'type' => 'int',
01967         'not null' => TRUE,
01968       ),
01969       'is_current' => array(
01970         'description' => 'TODO: please describe this field!',
01971         'type' => 'boolean',
01972         'not null' => TRUE,
01973         'default' => 'ru',
01974       ),
01975     ),
01976     'primary key' => array(
01977       0 => 'cell_line_dbxref_id',
01978     ),
01979     'unique keys' => array(
01980       'cell_line_dbxref_c1' => array(
01981         0 => 'cell_line_id',
01982         1 => 'dbxref_id',
01983       ),
01984     ),
01985     'foreign keys' => array(
01986       'dbxref' => array(
01987         'table' => 'dbxref',
01988         'columns' => array(
01989           'dbxref_id' => 'dbxref_id',
01990         ),
01991       ),
01992       'cell_line' => array(
01993         'table' => 'cell_line',
01994         'columns' => array(
01995           'cell_line_id' => 'cell_line_id',
01996         ),
01997       ),
01998     ),
01999     'table' => 'cell_line_dbxref',
02000     'referring_tables' => NULL,
02001   );
02002   return $description;
02003 }
02017 function tripal_core_chado_schema_v1_2_cell_line_feature() {
02018   $description =  array(
02019     'description' => 'TODO: please describe this table!',
02020     'fields' => array(
02021       'cell_line_feature_id' => array(
02022         'description' => 'TODO: please describe this field!',
02023         'type' => 'serial',
02024         'not null' => TRUE,
02025       ),
02026       'cell_line_id' => array(
02027         'description' => 'TODO: please describe this field!',
02028         'type' => 'int',
02029         'not null' => TRUE,
02030       ),
02031       'feature_id' => array(
02032         'description' => 'TODO: please describe this field!',
02033         'type' => 'int',
02034         'not null' => TRUE,
02035       ),
02036       'pub_id' => array(
02037         'description' => 'TODO: please describe this field!',
02038         'type' => 'int',
02039         'not null' => TRUE,
02040       ),
02041     ),
02042     'primary key' => array(
02043       0 => 'cell_line_feature_id',
02044     ),
02045     'unique keys' => array(
02046       'cell_line_feature_c1' => array(
02047         0 => 'cell_line_id',
02048         1 => 'feature_id',
02049         2 => 'pub_id',
02050       ),
02051     ),
02052     'foreign keys' => array(
02053       'pub' => array(
02054         'table' => 'pub',
02055         'columns' => array(
02056           'pub_id' => 'pub_id',
02057         ),
02058       ),
02059       'feature' => array(
02060         'table' => 'feature',
02061         'columns' => array(
02062           'feature_id' => 'feature_id',
02063         ),
02064       ),
02065       'cell_line' => array(
02066         'table' => 'cell_line',
02067         'columns' => array(
02068           'cell_line_id' => 'cell_line_id',
02069         ),
02070       ),
02071     ),
02072     'table' => 'cell_line_feature',
02073     'referring_tables' => NULL,
02074   );
02075   return $description;
02076 }
02090 function tripal_core_chado_schema_v1_2_cell_line_library() {
02091   $description =  array(
02092     'description' => 'TODO: please describe this table!',
02093     'fields' => array(
02094       'cell_line_library_id' => array(
02095         'description' => 'TODO: please describe this field!',
02096         'type' => 'serial',
02097         'not null' => TRUE,
02098       ),
02099       'cell_line_id' => array(
02100         'description' => 'TODO: please describe this field!',
02101         'type' => 'int',
02102         'not null' => TRUE,
02103       ),
02104       'library_id' => array(
02105         'description' => 'TODO: please describe this field!',
02106         'type' => 'int',
02107         'not null' => TRUE,
02108       ),
02109       'pub_id' => array(
02110         'description' => 'TODO: please describe this field!',
02111         'type' => 'int',
02112         'not null' => TRUE,
02113       ),
02114     ),
02115     'primary key' => array(
02116       0 => 'cell_line_library_id',
02117     ),
02118     'unique keys' => array(
02119       'cell_line_library_c1' => array(
02120         0 => 'cell_line_id',
02121         1 => 'library_id',
02122         2 => 'pub_id',
02123       ),
02124     ),
02125     'foreign keys' => array(
02126       'pub' => array(
02127         'table' => 'pub',
02128         'columns' => array(
02129           'pub_id' => 'pub_id',
02130         ),
02131       ),
02132       'library' => array(
02133         'table' => 'library',
02134         'columns' => array(
02135           'library_id' => 'library_id',
02136         ),
02137       ),
02138       'cell_line' => array(
02139         'table' => 'cell_line',
02140         'columns' => array(
02141           'cell_line_id' => 'cell_line_id',
02142         ),
02143       ),
02144     ),
02145     'table' => 'cell_line_library',
02146     'referring_tables' => NULL,
02147   );
02148   return $description;
02149 }
02163 function tripal_core_chado_schema_v1_2_cell_line_pub() {
02164   $description =  array(
02165     'description' => 'TODO: please describe this table!',
02166     'fields' => array(
02167       'cell_line_pub_id' => array(
02168         'description' => 'TODO: please describe this field!',
02169         'type' => 'serial',
02170         'not null' => TRUE,
02171       ),
02172       'cell_line_id' => array(
02173         'description' => 'TODO: please describe this field!',
02174         'type' => 'int',
02175         'not null' => TRUE,
02176       ),
02177       'pub_id' => array(
02178         'description' => 'TODO: please describe this field!',
02179         'type' => 'int',
02180         'not null' => TRUE,
02181       ),
02182     ),
02183     'primary key' => array(
02184       0 => 'cell_line_pub_id',
02185     ),
02186     'unique keys' => array(
02187       'cell_line_pub_c1' => array(
02188         0 => 'cell_line_id',
02189         1 => 'pub_id',
02190       ),
02191     ),
02192     'foreign keys' => array(
02193       'pub' => array(
02194         'table' => 'pub',
02195         'columns' => array(
02196           'pub_id' => 'pub_id',
02197         ),
02198       ),
02199       'cell_line' => array(
02200         'table' => 'cell_line',
02201         'columns' => array(
02202           'cell_line_id' => 'cell_line_id',
02203         ),
02204       ),
02205     ),
02206     'table' => 'cell_line_pub',
02207     'referring_tables' => NULL,
02208   );
02209   return $description;
02210 }
02224 function tripal_core_chado_schema_v1_2_cell_line_relationship() {
02225   $description =  array(
02226     'description' => 'TODO: please describe this table!',
02227     'fields' => array(
02228       'cell_line_relationship_id' => array(
02229         'description' => 'TODO: please describe this field!',
02230         'type' => 'serial',
02231         'not null' => TRUE,
02232       ),
02233       'subject_id' => array(
02234         'description' => 'TODO: please describe this field!',
02235         'type' => 'int',
02236         'not null' => TRUE,
02237       ),
02238       'object_id' => array(
02239         'description' => 'TODO: please describe this field!',
02240         'type' => 'int',
02241         'not null' => TRUE,
02242       ),
02243       'type_id' => array(
02244         'description' => 'TODO: please describe this field!',
02245         'type' => 'int',
02246         'not null' => TRUE,
02247       ),
02248     ),
02249     'primary key' => array(
02250       0 => 'cell_line_relationship_id',
02251     ),
02252     'unique keys' => array(
02253       'cell_line_relationship_c1' => array(
02254         0 => 'subject_id',
02255         1 => 'object_id',
02256         2 => 'type_id',
02257       ),
02258     ),
02259     'foreign keys' => array(
02260       'cvterm' => array(
02261         'table' => 'cvterm',
02262         'columns' => array(
02263           'type_id' => 'cvterm_id',
02264         ),
02265       ),
02266       'cell_line' => array(
02267         'table' => 'cell_line',
02268         'columns' => array(
02269           'subject_id' => 'cell_line_id',
02270           'object_id' => 'cell_line_id',
02271         ),
02272       ),
02273     ),
02274     'table' => 'cell_line_relationship',
02275     'referring_tables' => NULL,
02276   );
02277   return $description;
02278 }
02292 function tripal_core_chado_schema_v1_2_cell_line_synonym() {
02293   $description =  array(
02294     'description' => 'TODO: please describe this table!',
02295     'fields' => array(
02296       'cell_line_synonym_id' => array(
02297         'description' => 'TODO: please describe this field!',
02298         'type' => 'serial',
02299         'not null' => TRUE,
02300       ),
02301       'cell_line_id' => array(
02302         'description' => 'TODO: please describe this field!',
02303         'type' => 'int',
02304         'not null' => TRUE,
02305       ),
02306       'synonym_id' => array(
02307         'description' => 'TODO: please describe this field!',
02308         'type' => 'int',
02309         'not null' => TRUE,
02310       ),
02311       'pub_id' => array(
02312         'description' => 'TODO: please describe this field!',
02313         'type' => 'int',
02314         'not null' => TRUE,
02315       ),
02316       'is_current' => array(
02317         'description' => 'TODO: please describe this field!',
02318         'type' => 'boolean',
02319         'not null' => TRUE,
02320         'default' => 'als',
02321       ),
02322       'is_internal' => array(
02323         'description' => 'TODO: please describe this field!',
02324         'type' => 'boolean',
02325         'not null' => TRUE,
02326         'default' => 'als',
02327       ),
02328     ),
02329     'primary key' => array(
02330       0 => 'cell_line_synonym_id',
02331     ),
02332     'unique keys' => array(
02333       'cell_line_synonym_c1' => array(
02334         0 => 'synonym_id',
02335         1 => 'cell_line_id',
02336         2 => 'pub_id',
02337       ),
02338     ),
02339     'foreign keys' => array(
02340       'pub' => array(
02341         'table' => 'pub',
02342         'columns' => array(
02343           'pub_id' => 'pub_id',
02344         ),
02345       ),
02346       'synonym' => array(
02347         'table' => 'synonym',
02348         'columns' => array(
02349           'synonym_id' => 'synonym_id',
02350         ),
02351       ),
02352       'cell_line' => array(
02353         'table' => 'cell_line',
02354         'columns' => array(
02355           'cell_line_id' => 'cell_line_id',
02356         ),
02357       ),
02358     ),
02359     'table' => 'cell_line_synonym',
02360     'referring_tables' => NULL,
02361   );
02362   return $description;
02363 }
02377 function tripal_core_chado_schema_v1_2_cell_lineprop() {
02378   $description =  array(
02379     'description' => 'TODO: please describe this table!',
02380     'fields' => array(
02381       'cell_lineprop_id' => array(
02382         'description' => 'TODO: please describe this field!',
02383         'type' => 'serial',
02384         'not null' => TRUE,
02385       ),
02386       'cell_line_id' => array(
02387         'description' => 'TODO: please describe this field!',
02388         'type' => 'int',
02389         'not null' => TRUE,
02390       ),
02391       'type_id' => array(
02392         'description' => 'TODO: please describe this field!',
02393         'type' => 'int',
02394         'not null' => TRUE,
02395       ),
02396       'value' => array(
02397         'description' => 'TODO: please describe this field!',
02398         'type' => 'text',
02399         'not null' => FALSE,
02400       ),
02401       'rank' => array(
02402         'description' => 'TODO: please describe this field!',
02403         'type' => 'int',
02404         'not null' => TRUE,
02405         'default' => 0,
02406       ),
02407     ),
02408     'primary key' => array(
02409       0 => 'cell_lineprop_id',
02410     ),
02411     'unique keys' => array(
02412       'cell_lineprop_c1' => array(
02413         0 => 'cell_line_id',
02414         1 => 'type_id',
02415         2 => 'rank',
02416       ),
02417     ),
02418     'foreign keys' => array(
02419       'cvterm' => array(
02420         'table' => 'cvterm',
02421         'columns' => array(
02422           'type_id' => 'cvterm_id',
02423         ),
02424       ),
02425       'cell_line' => array(
02426         'table' => 'cell_line',
02427         'columns' => array(
02428           'cell_line_id' => 'cell_line_id',
02429         ),
02430       ),
02431     ),
02432     'table' => 'cell_lineprop',
02433     'referring_tables' => array(
02434       0 => 'cell_lineprop_pub',
02435     ),
02436   );
02437   return $description;
02438 }
02452 function tripal_core_chado_schema_v1_2_cell_lineprop_pub() {
02453   $description =  array(
02454     'description' => 'TODO: please describe this table!',
02455     'fields' => array(
02456       'cell_lineprop_pub_id' => array(
02457         'description' => 'TODO: please describe this field!',
02458         'type' => 'serial',
02459         'not null' => TRUE,
02460       ),
02461       'cell_lineprop_id' => array(
02462         'description' => 'TODO: please describe this field!',
02463         'type' => 'int',
02464         'not null' => TRUE,
02465       ),
02466       'pub_id' => array(
02467         'description' => 'TODO: please describe this field!',
02468         'type' => 'int',
02469         'not null' => TRUE,
02470       ),
02471     ),
02472     'primary key' => array(
02473       0 => 'cell_lineprop_pub_id',
02474     ),
02475     'unique keys' => array(
02476       'cell_lineprop_pub_c1' => array(
02477         0 => 'cell_lineprop_id',
02478         1 => 'pub_id',
02479       ),
02480     ),
02481     'foreign keys' => array(
02482       'pub' => array(
02483         'table' => 'pub',
02484         'columns' => array(
02485           'pub_id' => 'pub_id',
02486         ),
02487       ),
02488       'cell_lineprop' => array(
02489         'table' => 'cell_lineprop',
02490         'columns' => array(
02491           'cell_lineprop_id' => 'cell_lineprop_id',
02492         ),
02493       ),
02494     ),
02495     'table' => 'cell_lineprop_pub',
02496     'referring_tables' => NULL,
02497   );
02498   return $description;
02499 }
02513 function tripal_core_chado_schema_v1_2_chadoprop() {
02514   $description =  array(
02515     'description' => 'TODO: please describe this table!',
02516     'fields' => array(
02517       'chadoprop_id' => array(
02518         'description' => 'TODO: please describe this field!',
02519         'type' => 'serial',
02520         'not null' => TRUE,
02521       ),
02522       'type_id' => array(
02523         'description' => 'TODO: please describe this field!',
02524         'type' => 'int',
02525         'not null' => TRUE,
02526       ),
02527       'value' => array(
02528         'description' => 'TODO: please describe this field!',
02529         'type' => 'text',
02530         'not null' => FALSE,
02531       ),
02532       'rank' => array(
02533         'description' => 'TODO: please describe this field!',
02534         'type' => 'int',
02535         'not null' => TRUE,
02536         'default' => 0,
02537       ),
02538     ),
02539     'primary key' => array(
02540       0 => 'chadoprop_id',
02541     ),
02542     'unique keys' => array(
02543       'chadoprop_c1' => array(
02544         0 => 'type_id',
02545         1 => 'rank',
02546       ),
02547     ),
02548     'foreign keys' => array(
02549       'cvterm' => array(
02550         'table' => 'cvterm',
02551         'columns' => array(
02552           'type_id' => 'cvterm_id',
02553         ),
02554       ),
02555     ),
02556     'table' => 'chadoprop',
02557     'referring_tables' => NULL,
02558   );
02559   return $description;
02560 }
02574 function tripal_core_chado_schema_v1_2_channel() {
02575   $description =  array(
02576     'description' => 'TODO: please describe this table!',
02577     'fields' => array(
02578       'channel_id' => array(
02579         'description' => 'TODO: please describe this field!',
02580         'type' => 'serial',
02581         'not null' => TRUE,
02582       ),
02583       'name' => array(
02584         'description' => 'TODO: please describe this field!',
02585         'type' => 'text',
02586         'not null' => TRUE,
02587       ),
02588       'definition' => array(
02589         'description' => 'TODO: please describe this field!',
02590         'type' => 'text',
02591         'not null' => TRUE,
02592       ),
02593     ),
02594     'primary key' => array(
02595       0 => 'channel_id',
02596     ),
02597     'unique keys' => array(
02598       'channel_c1' => array(
02599         0 => 'name',
02600       ),
02601     ),
02602     'foreign keys' => array(
02603     ),
02604     'table' => 'channel',
02605     'referring_tables' => array(
02606       0 => 'acquisition',
02607       1 => 'assay_biomaterial',
02608     ),
02609   );
02610   return $description;
02611 }
02625 function tripal_core_chado_schema_v1_2_contact() {
02626   $description =  array(
02627     'description' => 'TODO: please describe this table!',
02628     'fields' => array(
02629       'contact_id' => array(
02630         'description' => 'TODO: please describe this field!',
02631         'type' => 'serial',
02632         'not null' => TRUE,
02633       ),
02634       'type_id' => array(
02635         'description' => 'TODO: please describe this field!',
02636         'type' => 'int',
02637         'not null' => FALSE,
02638       ),
02639       'name' => array(
02640         'description' => 'TODO: please describe this field!',
02641         'type' => 'varchar',
02642         'length' => '255',
02643         'not null' => TRUE,
02644       ),
02645       'description' => array(
02646         'description' => 'TODO: please describe this field!',
02647         'type' => 'varchar',
02648         'length' => '255',
02649         'not null' => FALSE,
02650       ),
02651     ),
02652     'primary key' => array(
02653       0 => 'contact_id',
02654     ),
02655     'unique keys' => array(
02656       'contact_c1' => array(
02657         0 => 'name',
02658       ),
02659     ),
02660     'foreign keys' => array(
02661       'cvterm' => array(
02662         'table' => 'cvterm',
02663         'columns' => array(
02664           'type_id' => 'cvterm_id',
02665         ),
02666       ),
02667     ),
02668     'table' => 'contact',
02669     'referring_tables' => array(
02670       0 => 'arraydesign',
02671       1 => 'assay',
02672       2 => 'biomaterial',
02673       3 => 'contact_relationship',
02674       5 => 'nd_experiment_contact',
02675       6 => 'project_contact',
02676       14 => 'quantification',
02677       15 => 'stockcollection',
02678       16 => 'study',
02679     ),
02680   );
02681   return $description;
02682 }
02696 function tripal_core_chado_schema_v1_2_contact_relationship() {
02697   $description =  array(
02698     'description' => 'TODO: please describe this table!',
02699     'fields' => array(
02700       'contact_relationship_id' => array(
02701         'description' => 'TODO: please describe this field!',
02702         'type' => 'serial',
02703         'not null' => TRUE,
02704       ),
02705       'type_id' => array(
02706         'description' => 'TODO: please describe this field!',
02707         'type' => 'int',
02708         'not null' => TRUE,
02709       ),
02710       'subject_id' => array(
02711         'description' => 'TODO: please describe this field!',
02712         'type' => 'int',
02713         'not null' => TRUE,
02714       ),
02715       'object_id' => array(
02716         'description' => 'TODO: please describe this field!',
02717         'type' => 'int',
02718         'not null' => TRUE,
02719       ),
02720     ),
02721     'primary key' => array(
02722       0 => 'contact_relationship_id',
02723     ),
02724     'unique keys' => array(
02725       'contact_relationship_c1' => array(
02726         0 => 'subject_id',
02727         1 => 'object_id',
02728         2 => 'type_id',
02729       ),
02730     ),
02731     'indexes' => array(
02732       'contact_relationship_idx1' => array(
02733         0 => 'type_id',
02734       ),
02735       'contact_relationship_idx2' => array(
02736         0 => 'subject_id',
02737       ),
02738       'contact_relationship_idx3' => array(
02739         0 => 'object_id',
02740       ),
02741     ),
02742     'foreign keys' => array(
02743       'cvterm' => array(
02744         'table' => 'cvterm',
02745         'columns' => array(
02746           'type_id' => 'cvterm_id',
02747         ),
02748       ),
02749       'contact' => array(
02750         'table' => 'contact',
02751         'columns' => array(
02752           'subject_id' => 'contact_id',
02753           'object_id' => 'contact_id',
02754         ),
02755       ),
02756     ),
02757     'table' => 'contact_relationship',
02758     'referring_tables' => NULL,
02759   );
02760   return $description;
02761 }
02775 function tripal_core_chado_schema_v1_2_control() {
02776   $description =  array(
02777     'description' => 'TODO: please describe this table!',
02778     'fields' => array(
02779       'control_id' => array(
02780         'description' => 'TODO: please describe this field!',
02781         'type' => 'serial',
02782         'not null' => TRUE,
02783       ),
02784       'type_id' => array(
02785         'description' => 'TODO: please describe this field!',
02786         'type' => 'int',
02787         'not null' => TRUE,
02788       ),
02789       'assay_id' => array(
02790         'description' => 'TODO: please describe this field!',
02791         'type' => 'int',
02792         'not null' => TRUE,
02793       ),
02794       'tableinfo_id' => array(
02795         'description' => 'TODO: please describe this field!',
02796         'type' => 'int',
02797         'not null' => TRUE,
02798       ),
02799       'row_id' => array(
02800         'description' => 'TODO: please describe this field!',
02801         'type' => 'int',
02802         'not null' => TRUE,
02803       ),
02804       'name' => array(
02805         'description' => 'TODO: please describe this field!',
02806         'type' => 'text',
02807         'not null' => FALSE,
02808       ),
02809       'value' => array(
02810         'description' => 'TODO: please describe this field!',
02811         'type' => 'text',
02812         'not null' => FALSE,
02813       ),
02814       'rank' => array(
02815         'description' => 'TODO: please describe this field!',
02816         'type' => 'int',
02817         'not null' => TRUE,
02818         'default' => 0,
02819       ),
02820     ),
02821     'primary key' => array(
02822       0 => 'control_id',
02823     ),
02824     'indexes' => array(
02825       'control_idx1' => array(
02826         0 => 'type_id',
02827       ),
02828       'control_idx2' => array(
02829         0 => 'assay_id',
02830       ),
02831       'control_idx3' => array(
02832         0 => 'tableinfo_id',
02833       ),
02834       'control_idx4' => array(
02835         0 => 'row_id',
02836       ),
02837     ),
02838     'foreign keys' => array(
02839       'cvterm' => array(
02840         'table' => 'cvterm',
02841         'columns' => array(
02842           'type_id' => 'cvterm_id',
02843         ),
02844       ),
02845       'tableinfo' => array(
02846         'table' => 'tableinfo',
02847         'columns' => array(
02848           'tableinfo_id' => 'tableinfo_id',
02849         ),
02850       ),
02851       'assay' => array(
02852         'table' => 'assay',
02853         'columns' => array(
02854           'assay_id' => 'assay_id',
02855         ),
02856       ),
02857     ),
02858     'table' => 'control',
02859     'referring_tables' => NULL,
02860   );
02861   return $description;
02862 }
02876 function tripal_core_chado_schema_v1_2_cv() {
02877   $description =  array(
02878     'description' => 'TODO: please describe this table!',
02879     'fields' => array(
02880       'cv_id' => array(
02881         'description' => 'TODO: please describe this field!',
02882         'type' => 'serial',
02883         'not null' => TRUE,
02884       ),
02885       'name' => array(
02886         'description' => 'TODO: please describe this field!',
02887         'type' => 'varchar',
02888         'length' => '255',
02889         'not null' => TRUE,
02890       ),
02891       'definition' => array(
02892         'description' => 'TODO: please describe this field!',
02893         'type' => 'text',
02894         'not null' => FALSE,
02895       ),
02896     ),
02897     'primary key' => array(
02898       0 => 'cv_id',
02899     ),
02900     'unique keys' => array(
02901       'cv_c1' => array(
02902         0 => 'name',
02903       ),
02904     ),
02905     'foreign keys' => array(
02906     ),
02907     'table' => 'cv',
02908     'referring_tables' => array(
02909       0 => 'cvprop',
02910       1 => 'cvterm',
02911       2 => 'cvtermpath',
02912     ),
02913   );
02914   return $description;
02915 }
02929 function tripal_core_chado_schema_v1_2_cvprop() {
02930   $description =  array(
02931     'description' => 'TODO: please describe this table!',
02932     'fields' => array(
02933       'cvprop_id' => array(
02934         'description' => 'TODO: please describe this field!',
02935         'type' => 'serial',
02936         'not null' => TRUE,
02937       ),
02938       'cv_id' => array(
02939         'description' => 'TODO: please describe this field!',
02940         'type' => 'int',
02941         'not null' => TRUE,
02942       ),
02943       'type_id' => array(
02944         'description' => 'TODO: please describe this field!',
02945         'type' => 'int',
02946         'not null' => TRUE,
02947       ),
02948       'value' => array(
02949         'description' => 'TODO: please describe this field!',
02950         'type' => 'text',
02951         'not null' => FALSE,
02952       ),
02953       'rank' => array(
02954         'description' => 'TODO: please describe this field!',
02955         'type' => 'int',
02956         'not null' => TRUE,
02957         'default' => 0,
02958       ),
02959     ),
02960     'primary key' => array(
02961       0 => 'cvprop_id',
02962     ),
02963     'unique keys' => array(
02964       'cvprop_c1' => array(
02965         0 => 'cv_id',
02966         1 => 'type_id',
02967         2 => 'rank',
02968       ),
02969     ),
02970     'foreign keys' => array(
02971       'cvterm' => array(
02972         'table' => 'cvterm',
02973         'columns' => array(
02974           'type_id' => 'cvterm_id',
02975         ),
02976       ),
02977       'cv' => array(
02978         'table' => 'cv',
02979         'columns' => array(
02980           'cv_id' => 'cv_id',
02981         ),
02982       ),
02983     ),
02984     'table' => 'cvprop',
02985     'referring_tables' => NULL,
02986   );
02987   return $description;
02988 }
03002 function tripal_core_chado_schema_v1_2_cvterm() {
03003   $description =  array(
03004     'description' => 'TODO: please describe this table!',
03005     'fields' => array(
03006       'cvterm_id' => array(
03007         'description' => 'TODO: please describe this field!',
03008         'type' => 'serial',
03009         'not null' => TRUE,
03010       ),
03011       'cv_id' => array(
03012         'description' => 'TODO: please describe this field!',
03013         'type' => 'int',
03014         'not null' => TRUE,
03015       ),
03016       'name' => array(
03017         'description' => 'TODO: please describe this field!',
03018         'type' => 'varchar',
03019         'length' => '1024',
03020         'not null' => TRUE,
03021       ),
03022       'definition' => array(
03023         'description' => 'TODO: please describe this field!',
03024         'type' => 'text',
03025         'not null' => FALSE,
03026       ),
03027       'dbxref_id' => array(
03028         'description' => 'TODO: please describe this field!',
03029         'type' => 'int',
03030         'not null' => TRUE,
03031       ),
03032       'is_obsolete' => array(
03033         'description' => 'TODO: please describe this field!',
03034         'type' => 'int',
03035         'not null' => TRUE,
03036         'default' => 0,
03037       ),
03038       'is_relationshiptype' => array(
03039         'description' => 'TODO: please describe this field!',
03040         'type' => 'int',
03041         'not null' => TRUE,
03042         'default' => 0,
03043       ),
03044     ),
03045     'primary key' => array(
03046       0 => 'cvterm_id',
03047     ),
03048     'unique keys' => array(
03049       'cvterm_c1' => array(
03050         0 => 'name',
03051         1 => 'cv_id',
03052         2 => 'is_obsolete',
03053       ),
03054       'cvterm_c2' => array(
03055         0 => 'dbxref_id',
03056       ),
03057     ),
03058     'indexes' => array(
03059       'cvterm_idx1' => array(
03060         0 => 'cv_id',
03061       ),
03062       'cvterm_idx2' => array(
03063         0 => 'name',
03064       ),
03065       'cvterm_idx3' => array(
03066         0 => 'dbxref_id',
03067       ),
03068     ),
03069     'foreign keys' => array(
03070       'cv' => array(
03071         'table' => 'cv',
03072         'columns' => array(
03073           'cv_id' => 'cv_id',
03074         ),
03075       ),
03076       'dbxref' => array(
03077         'table' => 'dbxref',
03078         'columns' => array(
03079           'dbxref_id' => 'dbxref_id',
03080         ),
03081       ),
03082     ),
03083     'table' => 'cvterm',
03084     'referring_tables' => array(
03085       0 => 'acquisition_relationship',
03086       1 => 'acquisitionprop',
03087       2 => 'analysisfeatureprop',
03088       3 => 'analysisprop',
03089       4 => 'arraydesign',
03090       6 => 'arraydesignprop',
03091       7 => 'assayprop',
03092       8 => 'biomaterial_relationship',
03093       9 => 'biomaterial_treatment',
03094       10 => 'biomaterialprop',
03095       11 => 'cell_line_cvterm',
03096       12 => 'cell_line_cvtermprop',
03097       13 => 'cell_line_relationship',
03098       14 => 'cell_lineprop',
03099       15 => 'chadoprop',
03100       23 => 'contact',
03101       24 => 'contact_relationship',
03102       25 => 'control',
03103       26 => 'cvprop',
03104       27 => 'cvterm_dbxref',
03105       28 => 'cvterm_relationship',
03106       31 => 'cvtermpath',
03107       34 => 'cvtermprop',
03108       36 => 'cvtermsynonym',
03109       38 => 'dbxrefprop',
03110       39 => 'element',
03111       40 => 'element_relationship',
03112       41 => 'elementresult_relationship',
03113       42 => 'environment_cvterm',
03114       43 => 'expression_cvterm',
03115       45 => 'expression_cvtermprop',
03116       46 => 'expressionprop',
03117       47 => 'feature',
03118       48 => 'feature_cvterm',
03119       49 => 'feature_cvtermprop',
03120       50 => 'feature_expressionprop',
03121       51 => 'feature_genotype',
03122       52 => 'feature_pubprop',
03123       53 => 'feature_relationship',
03124       54 => 'feature_relationshipprop',
03125       55 => 'featuremap',
03126       56 => 'featureprop',
03127       57 => 'genotype',
03128       58 => 'genotypeprop',
03129       66 => 'library',
03130       67 => 'library_cvterm',
03131       68 => 'libraryprop',
03132       69 => 'nd_experiment',
03133       70 => 'nd_experiment_stock',
03134       71 => 'nd_experiment_stockprop',
03135       72 => 'nd_experimentprop',
03136       73 => 'nd_geolocationprop',
03137       74 => 'nd_protocol',
03138       75 => 'nd_protocol_reagent',
03139       76 => 'nd_protocolprop',
03140       77 => 'nd_reagent',
03141       78 => 'nd_reagent_relationship',
03142       79 => 'nd_reagentprop',
03143       80 => 'organismprop',
03144       81 => 'phendesc',
03145       82 => 'phenotype',
03146       86 => 'phenotype_comparison_cvterm',
03147       87 => 'phenotype_cvterm',
03148       88 => 'phenstatement',
03149       89 => 'phylonode',
03150       90 => 'phylonode_relationship',
03151       91 => 'phylonodeprop',
03152       92 => 'phylotree',
03153       93 => 'project_relationship',
03154       101 => 'projectprop',
03155       109 => 'protocol',
03156       110 => 'protocolparam',
03157       112 => 'pub',
03158       113 => 'pub_relationship',
03159       114 => 'pubprop',
03160       115 => 'quantification_relationship',
03161       116 => 'quantificationprop',
03162       117 => 'stock',
03163       118 => 'stock_cvterm',
03164       119 => 'stock_cvtermprop',
03165       127 => 'stock_dbxrefprop',
03166       135 => 'stock_relationship',
03167       136 => 'stock_relationship_cvterm',
03168       144 => 'stockcollection',
03169       145 => 'stockcollectionprop',
03170       146 => 'stockprop',
03171       147 => 'studydesignprop',
03172       148 => 'studyfactor',
03173       149 => 'studyprop',
03174       150 => 'studyprop_feature',
03175       151 => 'synonym',
03176       152 => 'treatment',
03177     ),
03178   );
03179   return $description;
03180 }
03194 function tripal_core_chado_schema_v1_2_cvterm_dbxref() {
03195   $description =  array(
03196     'description' => 'TODO: please describe this table!',
03197     'fields' => array(
03198       'cvterm_dbxref_id' => array(
03199         'description' => 'TODO: please describe this field!',
03200         'type' => 'serial',
03201         'not null' => TRUE,
03202       ),
03203       'cvterm_id' => array(
03204         'description' => 'TODO: please describe this field!',
03205         'type' => 'int',
03206         'not null' => TRUE,
03207       ),
03208       'dbxref_id' => array(
03209         'description' => 'TODO: please describe this field!',
03210         'type' => 'int',
03211         'not null' => TRUE,
03212       ),
03213       'is_for_definition' => array(
03214         'description' => 'TODO: please describe this field!',
03215         'type' => 'int',
03216         'not null' => TRUE,
03217         'default' => 0,
03218       ),
03219     ),
03220     'primary key' => array(
03221       0 => 'cvterm_dbxref_id',
03222     ),
03223     'unique keys' => array(
03224       'cvterm_dbxref_c1' => array(
03225         0 => 'cvterm_id',
03226         1 => 'dbxref_id',
03227       ),
03228     ),
03229     'indexes' => array(
03230       'cvterm_dbxref_idx1' => array(
03231         0 => 'cvterm_id',
03232       ),
03233       'cvterm_dbxref_idx2' => array(
03234         0 => 'dbxref_id',
03235       ),
03236     ),
03237     'foreign keys' => array(
03238       'cvterm' => array(
03239         'table' => 'cvterm',
03240         'columns' => array(
03241           'cvterm_id' => 'cvterm_id',
03242         ),
03243       ),
03244       'dbxref' => array(
03245         'table' => 'dbxref',
03246         'columns' => array(
03247           'dbxref_id' => 'dbxref_id',
03248         ),
03249       ),
03250     ),
03251     'table' => 'cvterm_dbxref',
03252     'referring_tables' => NULL,
03253   );
03254   return $description;
03255 }
03269 function tripal_core_chado_schema_v1_2_cvterm_relationship() {
03270   $description =  array(
03271     'description' => 'TODO: please describe this table!',
03272     'fields' => array(
03273       'cvterm_relationship_id' => array(
03274         'description' => 'TODO: please describe this field!',
03275         'type' => 'serial',
03276         'not null' => TRUE,
03277       ),
03278       'type_id' => array(
03279         'description' => 'TODO: please describe this field!',
03280         'type' => 'int',
03281         'not null' => TRUE,
03282       ),
03283       'subject_id' => array(
03284         'description' => 'TODO: please describe this field!',
03285         'type' => 'int',
03286         'not null' => TRUE,
03287       ),
03288       'object_id' => array(
03289         'description' => 'TODO: please describe this field!',
03290         'type' => 'int',
03291         'not null' => TRUE,
03292       ),
03293     ),
03294     'primary key' => array(
03295       0 => 'cvterm_relationship_id',
03296     ),
03297     'unique keys' => array(
03298       'cvterm_relationship_c1' => array(
03299         0 => 'subject_id',
03300         1 => 'object_id',
03301         2 => 'type_id',
03302       ),
03303     ),
03304     'indexes' => array(
03305       'cvterm_relationship_idx1' => array(
03306         0 => 'type_id',
03307       ),
03308       'cvterm_relationship_idx2' => array(
03309         0 => 'subject_id',
03310       ),
03311       'cvterm_relationship_idx3' => array(
03312         0 => 'object_id',
03313       ),
03314     ),
03315     'foreign keys' => array(
03316       'cvterm' => array(
03317         'table' => 'cvterm',
03318         'columns' => array(
03319           'type_id' => 'cvterm_id',
03320           'subject_id' => 'cvterm_id',
03321           'object_id' => 'cvterm_id',
03322         ),
03323       ),
03324     ),
03325     'table' => 'cvterm_relationship',
03326     'referring_tables' => NULL,
03327   );
03328   return $description;
03329 }
03343 function tripal_core_chado_schema_v1_2_cvtermpath() {
03344   $description =  array(
03345     'description' => 'TODO: please describe this table!',
03346     'fields' => array(
03347       'cvtermpath_id' => array(
03348         'description' => 'TODO: please describe this field!',
03349         'type' => 'serial',
03350         'not null' => TRUE,
03351       ),
03352       'type_id' => array(
03353         'description' => 'TODO: please describe this field!',
03354         'type' => 'int',
03355         'not null' => FALSE,
03356       ),
03357       'subject_id' => array(
03358         'description' => 'TODO: please describe this field!',
03359         'type' => 'int',
03360         'not null' => TRUE,
03361       ),
03362       'object_id' => array(
03363         'description' => 'TODO: please describe this field!',
03364         'type' => 'int',
03365         'not null' => TRUE,
03366       ),
03367       'cv_id' => array(
03368         'description' => 'TODO: please describe this field!',
03369         'type' => 'int',
03370         'not null' => TRUE,
03371       ),
03372       'pathdistance' => array(
03373         'description' => 'TODO: please describe this field!',
03374         'type' => 'int',
03375         'not null' => FALSE,
03376       ),
03377     ),
03378     'primary key' => array(
03379       0 => 'cvtermpath_id',
03380     ),
03381     'unique keys' => array(
03382       'cvtermpath_c1' => array(
03383         0 => 'subject_id',
03384         1 => 'object_id',
03385         2 => 'type_id',
03386         3 => 'pathdistance',
03387       ),
03388     ),
03389     'indexes' => array(
03390       'cvtermpath_idx1' => array(
03391         0 => 'type_id',
03392       ),
03393       'cvtermpath_idx2' => array(
03394         0 => 'subject_id',
03395       ),
03396       'cvtermpath_idx3' => array(
03397         0 => 'object_id',
03398       ),
03399       'cvtermpath_idx4' => array(
03400         0 => 'cv_id',
03401       ),
03402     ),
03403     'foreign keys' => array(
03404       'cvterm' => array(
03405         'table' => 'cvterm',
03406         'columns' => array(
03407           'type_id' => 'cvterm_id',
03408           'subject_id' => 'cvterm_id',
03409           'object_id' => 'cvterm_id',
03410         ),
03411       ),
03412       'cv' => array(
03413         'table' => 'cv',
03414         'columns' => array(
03415           'cv_id' => 'cv_id',
03416         ),
03417       ),
03418     ),
03419     'table' => 'cvtermpath',
03420     'referring_tables' => NULL,
03421   );
03422   return $description;
03423 }
03437 function tripal_core_chado_schema_v1_2_cvtermprop() {
03438   $description =  array(
03439     'description' => 'TODO: please describe this table!',
03440     'fields' => array(
03441       'cvtermprop_id' => array(
03442         'description' => 'TODO: please describe this field!',
03443         'type' => 'serial',
03444         'not null' => TRUE,
03445       ),
03446       'cvterm_id' => array(
03447         'description' => 'TODO: please describe this field!',
03448         'type' => 'int',
03449         'not null' => TRUE,
03450       ),
03451       'type_id' => array(
03452         'description' => 'TODO: please describe this field!',
03453         'type' => 'int',
03454         'not null' => TRUE,
03455       ),
03456       'value' => array(
03457         'description' => 'TODO: please describe this field!',
03458         'type' => 'text',
03459         'not null' => TRUE,
03460         'default' => '',
03461       ),
03462       'rank' => array(
03463         'description' => 'TODO: please describe this field!',
03464         'type' => 'int',
03465         'not null' => TRUE,
03466         'default' => 0,
03467       ),
03468     ),
03469     'primary key' => array(
03470       0 => 'cvtermprop_id',
03471     ),
03472     'unique keys' => array(
03473       'cvterm_id' => array(
03474         0 => 'cvterm_id',
03475         1 => 'type_id',
03476         2 => 'value',
03477         3 => 'rank',
03478       ),
03479     ),
03480     'indexes' => array(
03481       'cvtermprop_idx1' => array(
03482         0 => 'cvterm_id',
03483       ),
03484       'cvtermprop_idx2' => array(
03485         0 => 'type_id',
03486       ),
03487     ),
03488     'foreign keys' => array(
03489       'cvterm' => array(
03490         'table' => 'cvterm',
03491         'columns' => array(
03492           'cvterm_id' => 'cvterm_id',
03493           'type_id' => 'cvterm_id',
03494         ),
03495       ),
03496     ),
03497     'table' => 'cvtermprop',
03498     'referring_tables' => NULL,
03499   );
03500   return $description;
03501 }
03515 function tripal_core_chado_schema_v1_2_cvtermsynonym() {
03516   $description =  array(
03517     'description' => 'TODO: please describe this table!',
03518     'fields' => array(
03519       'cvtermsynonym_id' => array(
03520         'description' => 'TODO: please describe this field!',
03521         'type' => 'serial',
03522         'not null' => TRUE,
03523       ),
03524       'cvterm_id' => array(
03525         'description' => 'TODO: please describe this field!',
03526         'type' => 'int',
03527         'not null' => TRUE,
03528       ),
03529       'synonym' => array(
03530         'description' => 'TODO: please describe this field!',
03531         'type' => 'varchar',
03532         'length' => '1024',
03533         'not null' => TRUE,
03534       ),
03535       'type_id' => array(
03536         'description' => 'TODO: please describe this field!',
03537         'type' => 'int',
03538         'not null' => FALSE,
03539       ),
03540     ),
03541     'primary key' => array(
03542       0 => 'cvtermsynonym_id',
03543     ),
03544     'unique keys' => array(
03545       'cvtermsynonym_c1' => array(
03546         0 => 'cvterm_id',
03547         1 => 'synonym',
03548       ),
03549     ),
03550     'indexes' => array(
03551       'cvtermsynonym_idx1' => array(
03552         0 => 'cvterm_id',
03553       ),
03554     ),
03555     'foreign keys' => array(
03556       'cvterm' => array(
03557         'table' => 'cvterm',
03558         'columns' => array(
03559           'cvterm_id' => 'cvterm_id',
03560           'type_id' => 'cvterm_id',
03561         ),
03562       ),
03563     ),
03564     'table' => 'cvtermsynonym',
03565     'referring_tables' => NULL,
03566   );
03567   return $description;
03568 }
03582 function tripal_core_chado_schema_v1_2_db() {
03583   $description =  array(
03584     'description' => 'TODO: please describe this table!',
03585     'fields' => array(
03586       'db_id' => array(
03587         'description' => 'TODO: please describe this field!',
03588         'type' => 'serial',
03589         'not null' => TRUE,
03590       ),
03591       'name' => array(
03592         'description' => 'TODO: please describe this field!',
03593         'type' => 'varchar',
03594         'length' => '255',
03595         'not null' => TRUE,
03596       ),
03597       'description' => array(
03598         'description' => 'TODO: please describe this field!',
03599         'type' => 'varchar',
03600         'length' => '255',
03601         'not null' => FALSE,
03602       ),
03603       'urlprefix' => array(
03604         'description' => 'TODO: please describe this field!',
03605         'type' => 'varchar',
03606         'length' => '255',
03607         'not null' => FALSE,
03608       ),
03609       'url' => array(
03610         'description' => 'TODO: please describe this field!',
03611         'type' => 'varchar',
03612         'length' => '255',
03613         'not null' => FALSE,
03614       ),
03615     ),
03616     'primary key' => array(
03617       0 => 'db_id',
03618     ),
03619     'unique keys' => array(
03620       'db_c1' => array(
03621         0 => 'name',
03622       ),
03623     ),
03624     'foreign keys' => array(
03625     ),
03626     'table' => 'db',
03627     'referring_tables' => array(
03628       0 => 'dbxref',
03629     ),
03630   );
03631   return $description;
03632 }
03646 function tripal_core_chado_schema_v1_2_dbxref() {
03647   $description =  array(
03648     'description' => 'TODO: please describe this table!',
03649     'fields' => array(
03650       'dbxref_id' => array(
03651         'description' => 'TODO: please describe this field!',
03652         'type' => 'serial',
03653         'not null' => TRUE,
03654       ),
03655       'db_id' => array(
03656         'description' => 'TODO: please describe this field!',
03657         'type' => 'int',
03658         'not null' => TRUE,
03659       ),
03660       'accession' => array(
03661         'description' => 'TODO: please describe this field!',
03662         'type' => 'varchar',
03663         'length' => '255',
03664         'not null' => TRUE,
03665       ),
03666       'version' => array(
03667         'description' => 'TODO: please describe this field!',
03668         'type' => 'varchar',
03669         'length' => '255',
03670         'not null' => TRUE,
03671         'default' => '',
03672       ),
03673       'description' => array(
03674         'description' => 'TODO: please describe this field!',
03675         'type' => 'text',
03676         'not null' => FALSE,
03677       ),
03678     ),
03679     'primary key' => array(
03680       0 => 'dbxref_id',
03681     ),
03682     'unique keys' => array(
03683       'dbxref_c1' => array(
03684         0 => 'db_id',
03685         1 => 'accession',
03686         2 => 'version',
03687       ),
03688     ),
03689     'indexes' => array(
03690       'dbxref_idx1' => array(
03691         0 => 'db_id',
03692       ),
03693       'dbxref_idx2' => array(
03694         0 => 'accession',
03695       ),
03696       'dbxref_idx3' => array(
03697         0 => 'version',
03698       ),
03699     ),
03700     'foreign keys' => array(
03701       'db' => array(
03702         'table' => 'db',
03703         'columns' => array(
03704           'db_id' => 'db_id',
03705         ),
03706       ),
03707     ),
03708     'table' => 'dbxref',
03709     'referring_tables' => array(
03710       0 => 'arraydesign',
03711       1 => 'assay',
03712       2 => 'biomaterial',
03713       3 => 'biomaterial_dbxref',
03714       4 => 'cell_line_dbxref',
03715       5 => 'cvterm',
03716       6 => 'cvterm_dbxref',
03717       7 => 'dbxrefprop',
03718       8 => 'element',
03719       9 => 'feature',
03720       10 => 'feature_cvterm_dbxref',
03721       11 => 'feature_dbxref',
03722       12 => 'library_dbxref',
03723       13 => 'nd_experiment_dbxref',
03724       14 => 'nd_experiment_stock_dbxref',
03725       15 => 'organism_dbxref',
03726       16 => 'phylonode_dbxref',
03727       17 => 'phylotree',
03728       18 => 'protocol',
03729       19 => 'pub_dbxref',
03730       20 => 'stock',
03731       21 => 'stock_dbxref',
03732       22 => 'study',
03733     ),
03734   );
03735   return $description;
03736 }
03750 function tripal_core_chado_schema_v1_2_dbxrefprop() {
03751   $description =  array(
03752     'description' => 'TODO: please describe this table!',
03753     'fields' => array(
03754       'dbxrefprop_id' => array(
03755         'description' => 'TODO: please describe this field!',
03756         'type' => 'serial',
03757         'not null' => TRUE,
03758       ),
03759       'dbxref_id' => array(
03760         'description' => 'TODO: please describe this field!',
03761         'type' => 'int',
03762         'not null' => TRUE,
03763       ),
03764       'type_id' => array(
03765         'description' => 'TODO: please describe this field!',
03766         'type' => 'int',
03767         'not null' => TRUE,
03768       ),
03769       'value' => array(
03770         'description' => 'TODO: please describe this field!',
03771         'type' => 'text',
03772         'not null' => TRUE,
03773         'default' => '',
03774       ),
03775       'rank' => array(
03776         'description' => 'TODO: please describe this field!',
03777         'type' => 'int',
03778         'not null' => TRUE,
03779         'default' => 0,
03780       ),
03781     ),
03782     'primary key' => array(
03783       0 => 'dbxrefprop_id',
03784     ),
03785     'unique keys' => array(
03786       'dbxrefprop_c1' => array(
03787         0 => 'dbxref_id',
03788         1 => 'type_id',
03789         2 => 'rank',
03790       ),
03791     ),
03792     'indexes' => array(
03793       'dbxrefprop_idx1' => array(
03794         0 => 'dbxref_id',
03795       ),
03796       'dbxrefprop_idx2' => array(
03797         0 => 'type_id',
03798       ),
03799     ),
03800     'foreign keys' => array(
03801       'cvterm' => array(
03802         'table' => 'cvterm',
03803         'columns' => array(
03804           'type_id' => 'cvterm_id',
03805         ),
03806       ),
03807       'dbxref' => array(
03808         'table' => 'dbxref',
03809         'columns' => array(
03810           'dbxref_id' => 'dbxref_id',
03811         ),
03812       ),
03813     ),
03814     'table' => 'dbxrefprop',
03815     'referring_tables' => NULL,
03816   );
03817   return $description;
03818 }
03832 function tripal_core_chado_schema_v1_2_eimage() {
03833   $description =  array(
03834     'description' => 'TODO: please describe this table!',
03835     'fields' => array(
03836       'eimage_id' => array(
03837         'description' => 'TODO: please describe this field!',
03838         'type' => 'serial',
03839         'not null' => TRUE,
03840       ),
03841       'eimage_data' => array(
03842         'description' => 'TODO: please describe this field!',
03843         'type' => 'text',
03844         'not null' => FALSE,
03845       ),
03846       'eimage_type' => array(
03847         'description' => 'TODO: please describe this field!',
03848         'type' => 'varchar',
03849         'length' => '255',
03850         'not null' => TRUE,
03851       ),
03852       'image_uri' => array(
03853         'description' => 'TODO: please describe this field!',
03854         'type' => 'varchar',
03855         'length' => '255',
03856         'not null' => FALSE,
03857       ),
03858     ),
03859     'primary key' => array(
03860       0 => 'eimage_id',
03861     ),
03862     'foreign keys' => array(
03863     ),
03864     'table' => 'eimage',
03865     'referring_tables' => array(
03866       0 => 'expression_image',
03867     ),
03868   );
03869   return $description;
03870 }
03884 function tripal_core_chado_schema_v1_2_element() {
03885   $description =  array(
03886     'description' => 'TODO: please describe this table!',
03887     'fields' => array(
03888       'element_id' => array(
03889         'description' => 'TODO: please describe this field!',
03890         'type' => 'serial',
03891         'not null' => TRUE,
03892       ),
03893       'feature_id' => array(
03894         'description' => 'TODO: please describe this field!',
03895         'type' => 'int',
03896         'not null' => FALSE,
03897       ),
03898       'arraydesign_id' => array(
03899         'description' => 'TODO: please describe this field!',
03900         'type' => 'int',
03901         'not null' => TRUE,
03902       ),
03903       'type_id' => array(
03904         'description' => 'TODO: please describe this field!',
03905         'type' => 'int',
03906         'not null' => FALSE,
03907       ),
03908       'dbxref_id' => array(
03909         'description' => 'TODO: please describe this field!',
03910         'type' => 'int',
03911         'not null' => FALSE,
03912       ),
03913     ),
03914     'primary key' => array(
03915       0 => 'element_id',
03916     ),
03917     'unique keys' => array(
03918       'element_c1' => array(
03919         0 => 'feature_id',
03920         1 => 'arraydesign_id',
03921       ),
03922     ),
03923     'indexes' => array(
03924       'element_idx1' => array(
03925         0 => 'feature_id',
03926       ),
03927       'element_idx2' => array(
03928         0 => 'arraydesign_id',
03929       ),
03930       'element_idx3' => array(
03931         0 => 'type_id',
03932       ),
03933       'element_idx4' => array(
03934         0 => 'dbxref_id',
03935       ),
03936     ),
03937     'foreign keys' => array(
03938       'cvterm' => array(
03939         'table' => 'cvterm',
03940         'columns' => array(
03941           'type_id' => 'cvterm_id',
03942         ),
03943       ),
03944       'dbxref' => array(
03945         'table' => 'dbxref',
03946         'columns' => array(
03947           'dbxref_id' => 'dbxref_id',
03948         ),
03949       ),
03950       'feature' => array(
03951         'table' => 'feature',
03952         'columns' => array(
03953           'feature_id' => 'feature_id',
03954         ),
03955       ),
03956       'arraydesign' => array(
03957         'table' => 'arraydesign',
03958         'columns' => array(
03959           'arraydesign_id' => 'arraydesign_id',
03960         ),
03961       ),
03962     ),
03963     'table' => 'element',
03964     'referring_tables' => array(
03965       0 => 'element_relationship',
03966       2 => 'elementresult',
03967     ),
03968   );
03969   return $description;
03970 }
03984 function tripal_core_chado_schema_v1_2_element_relationship() {
03985   $description =  array(
03986     'description' => 'TODO: please describe this table!',
03987     'fields' => array(
03988       'element_relationship_id' => array(
03989         'description' => 'TODO: please describe this field!',
03990         'type' => 'serial',
03991         'not null' => TRUE,
03992       ),
03993       'subject_id' => array(
03994         'description' => 'TODO: please describe this field!',
03995         'type' => 'int',
03996         'not null' => TRUE,
03997       ),
03998       'type_id' => array(
03999         'description' => 'TODO: please describe this field!',
04000         'type' => 'int',
04001         'not null' => TRUE,
04002       ),
04003       'object_id' => array(
04004         'description' => 'TODO: please describe this field!',
04005         'type' => 'int',
04006         'not null' => TRUE,
04007       ),
04008       'value' => array(
04009         'description' => 'TODO: please describe this field!',
04010         'type' => 'text',
04011         'not null' => FALSE,
04012       ),
04013       'rank' => array(
04014         'description' => 'TODO: please describe this field!',
04015         'type' => 'int',
04016         'not null' => TRUE,
04017         'default' => 0,
04018       ),
04019     ),
04020     'primary key' => array(
04021       0 => 'element_relationship_id',
04022     ),
04023     'unique keys' => array(
04024       'element_relationship_c1' => array(
04025         0 => 'subject_id',
04026         1 => 'object_id',
04027         2 => 'type_id',
04028         3 => 'rank',
04029       ),
04030     ),
04031     'indexes' => array(
04032       'element_relationship_idx1' => array(
04033         0 => 'subject_id',
04034       ),
04035       'element_relationship_idx2' => array(
04036         0 => 'type_id',
04037       ),
04038       'element_relationship_idx3' => array(
04039         0 => 'object_id',
04040       ),
04041       'element_relationship_idx4' => array(
04042         0 => 'value',
04043       ),
04044     ),
04045     'foreign keys' => array(
04046       'cvterm' => array(
04047         'table' => 'cvterm',
04048         'columns' => array(
04049           'type_id' => 'cvterm_id',
04050         ),
04051       ),
04052       'element' => array(
04053         'table' => 'element',
04054         'columns' => array(
04055           'subject_id' => 'element_id',
04056           'object_id' => 'element_id',
04057         ),
04058       ),
04059     ),
04060     'table' => 'element_relationship',
04061     'referring_tables' => NULL,
04062   );
04063   return $description;
04064 }
04078 function tripal_core_chado_schema_v1_2_elementresult() {
04079   $description =  array(
04080     'description' => 'TODO: please describe this table!',
04081     'fields' => array(
04082       'elementresult_id' => array(
04083         'description' => 'TODO: please describe this field!',
04084         'type' => 'serial',
04085         'not null' => TRUE,
04086       ),
04087       'element_id' => array(
04088         'description' => 'TODO: please describe this field!',
04089         'type' => 'int',
04090         'not null' => TRUE,
04091       ),
04092       'quantification_id' => array(
04093         'description' => 'TODO: please describe this field!',
04094         'type' => 'int',
04095         'not null' => TRUE,
04096       ),
04097       'signal' => array(
04098         'description' => 'TODO: please describe this field!',
04099         'type' => 'float',
04100         'size' => 'big',
04101         'not null' => TRUE,
04102       ),
04103     ),
04104     'primary key' => array(
04105       0 => 'elementresult_id',
04106     ),
04107     'unique keys' => array(
04108       'elementresult_c1' => array(
04109         0 => 'element_id',
04110         1 => 'quantification_id',
04111       ),
04112     ),
04113     'indexes' => array(
04114       'elementresult_idx1' => array(
04115         0 => 'element_id',
04116       ),
04117       'elementresult_idx2' => array(
04118         0 => 'quantification_id',
04119       ),
04120       'elementresult_idx3' => array(
04121         0 => 'signal',
04122       ),
04123     ),
04124     'foreign keys' => array(
04125       'quantification' => array(
04126         'table' => 'quantification',
04127         'columns' => array(
04128           'quantification_id' => 'quantification_id',
04129         ),
04130       ),
04131       'element' => array(
04132         'table' => 'element',
04133         'columns' => array(
04134           'element_id' => 'element_id',
04135         ),
04136       ),
04137     ),
04138     'table' => 'elementresult',
04139     'referring_tables' => array(
04140       0 => 'elementresult_relationship',
04141     ),
04142   );
04143   return $description;
04144 }
04158 function tripal_core_chado_schema_v1_2_elementresult_relationship() {
04159   $description =  array(
04160     'description' => 'TODO: please describe this table!',
04161     'fields' => array(
04162       'elementresult_relationship_id' => array(
04163         'description' => 'TODO: please describe this field!',
04164         'type' => 'serial',
04165         'not null' => TRUE,
04166       ),
04167       'subject_id' => array(
04168         'description' => 'TODO: please describe this field!',
04169         'type' => 'int',
04170         'not null' => TRUE,
04171       ),
04172       'type_id' => array(
04173         'description' => 'TODO: please describe this field!',
04174         'type' => 'int',
04175         'not null' => TRUE,
04176       ),
04177       'object_id' => array(
04178         'description' => 'TODO: please describe this field!',
04179         'type' => 'int',
04180         'not null' => TRUE,
04181       ),
04182       'value' => array(
04183         'description' => 'TODO: please describe this field!',
04184         'type' => 'text',
04185         'not null' => FALSE,
04186       ),
04187       'rank' => array(
04188         'description' => 'TODO: please describe this field!',
04189         'type' => 'int',
04190         'not null' => TRUE,
04191         'default' => 0,
04192       ),
04193     ),
04194     'primary key' => array(
04195       0 => 'elementresult_relationship_id',
04196     ),
04197     'unique keys' => array(
04198       'elementresult_relationship_c1' => array(
04199         0 => 'subject_id',
04200         1 => 'object_id',
04201         2 => 'type_id',
04202         3 => 'rank',
04203       ),
04204     ),
04205     'indexes' => array(
04206       'elementresult_relationship_idx1' => array(
04207         0 => 'subject_id',
04208       ),
04209       'elementresult_relationship_idx2' => array(
04210         0 => 'type_id',
04211       ),
04212       'elementresult_relationship_idx3' => array(
04213         0 => 'object_id',
04214       ),
04215       'elementresult_relationship_idx4' => array(
04216         0 => 'value',
04217       ),
04218     ),
04219     'foreign keys' => array(
04220       'cvterm' => array(
04221         'table' => 'cvterm',
04222         'columns' => array(
04223           'type_id' => 'cvterm_id',
04224         ),
04225       ),
04226       'elementresult' => array(
04227         'table' => 'elementresult',
04228         'columns' => array(
04229           'subject_id' => 'elementresult_id',
04230           'object_id' => 'elementresult_id',
04231         ),
04232       ),
04233     ),
04234     'table' => 'elementresult_relationship',
04235     'referring_tables' => NULL,
04236   );
04237   return $description;
04238 }
04252 function tripal_core_chado_schema_v1_2_environment() {
04253   $description =  array(
04254     'description' => 'TODO: please describe this table!',
04255     'fields' => array(
04256       'environment_id' => array(
04257         'description' => 'TODO: please describe this field!',
04258         'type' => 'serial',
04259         'not null' => TRUE,
04260       ),
04261       'uniquename' => array(
04262         'description' => 'TODO: please describe this field!',
04263         'type' => 'text',
04264         'not null' => TRUE,
04265       ),
04266       'description' => array(
04267         'description' => 'TODO: please describe this field!',
04268         'type' => 'text',
04269         'not null' => FALSE,
04270       ),
04271     ),
04272     'primary key' => array(
04273       0 => 'environment_id',
04274     ),
04275     'unique keys' => array(
04276       'environment_c1' => array(
04277         0 => 'uniquename',
04278       ),
04279     ),
04280     'indexes' => array(
04281       'environment_idx1' => array(
04282         0 => 'uniquename',
04283       ),
04284     ),
04285     'foreign keys' => array(
04286     ),
04287     'table' => 'environment',
04288     'referring_tables' => array(
04289       0 => 'environment_cvterm',
04290       1 => 'phendesc',
04291       2 => 'phenotype_comparison',
04292       4 => 'phenstatement',
04293     ),
04294   );
04295   return $description;
04296 }
04310 function tripal_core_chado_schema_v1_2_environment_cvterm() {
04311   $description =  array(
04312     'description' => 'TODO: please describe this table!',
04313     'fields' => array(
04314       'environment_cvterm_id' => array(
04315         'description' => 'TODO: please describe this field!',
04316         'type' => 'serial',
04317         'not null' => TRUE,
04318       ),
04319       'environment_id' => array(
04320         'description' => 'TODO: please describe this field!',
04321         'type' => 'int',
04322         'not null' => TRUE,
04323       ),
04324       'cvterm_id' => array(
04325         'description' => 'TODO: please describe this field!',
04326         'type' => 'int',
04327         'not null' => TRUE,
04328       ),
04329     ),
04330     'primary key' => array(
04331       0 => 'environment_cvterm_id',
04332     ),
04333     'unique keys' => array(
04334       'environment_cvterm_c1' => array(
04335         0 => 'environment_id',
04336         1 => 'cvterm_id',
04337       ),
04338     ),
04339     'indexes' => array(
04340       'environment_cvterm_idx1' => array(
04341         0 => 'environment_id',
04342       ),
04343       'environment_cvterm_idx2' => array(
04344         0 => 'cvterm_id',
04345       ),
04346     ),
04347     'foreign keys' => array(
04348       'cvterm' => array(
04349         'table' => 'cvterm',
04350         'columns' => array(
04351           'cvterm_id' => 'cvterm_id',
04352         ),
04353       ),
04354       'environment' => array(
04355         'table' => 'environment',
04356         'columns' => array(
04357           'environment_id' => 'environment_id',
04358         ),
04359       ),
04360     ),
04361     'table' => 'environment_cvterm',
04362     'referring_tables' => NULL,
04363   );
04364   return $description;
04365 }
04379 function tripal_core_chado_schema_v1_2_expression() {
04380   $description =  array(
04381     'description' => 'TODO: please describe this table!',
04382     'fields' => array(
04383       'expression_id' => array(
04384         'description' => 'TODO: please describe this field!',
04385         'type' => 'serial',
04386         'not null' => TRUE,
04387       ),
04388       'uniquename' => array(
04389         'description' => 'TODO: please describe this field!',
04390         'type' => 'text',
04391         'not null' => TRUE,
04392       ),
04393       'md5checksum' => array(
04394         'description' => 'TODO: please describe this field!',
04395         'type' => 'char',
04396         'length' => '32',
04397         'not null' => FALSE,
04398       ),
04399       'description' => array(
04400         'description' => 'TODO: please describe this field!',
04401         'type' => 'text',
04402         'not null' => FALSE,
04403       ),
04404     ),
04405     'primary key' => array(
04406       0 => 'expression_id',
04407     ),
04408     'unique keys' => array(
04409       'expression_c1' => array(
04410         0 => 'uniquename',
04411       ),
04412     ),
04413     'foreign keys' => array(
04414     ),
04415     'table' => 'expression',
04416     'referring_tables' => array(
04417       0 => 'expression_cvterm',
04418       1 => 'expression_image',
04419       2 => 'expression_pub',
04420       3 => 'expressionprop',
04421       4 => 'feature_expression',
04422     ),
04423   );
04424   return $description;
04425 }
04439 function tripal_core_chado_schema_v1_2_expression_cvterm() {
04440   $description =  array(
04441     'description' => 'TODO: please describe this table!',
04442     'fields' => array(
04443       'expression_cvterm_id' => array(
04444         'description' => 'TODO: please describe this field!',
04445         'type' => 'serial',
04446         'not null' => TRUE,
04447       ),
04448       'expression_id' => array(
04449         'description' => 'TODO: please describe this field!',
04450         'type' => 'int',
04451         'not null' => TRUE,
04452       ),
04453       'cvterm_id' => array(
04454         'description' => 'TODO: please describe this field!',
04455         'type' => 'int',
04456         'not null' => TRUE,
04457       ),
04458       'rank' => array(
04459         'description' => 'TODO: please describe this field!',
04460         'type' => 'int',
04461         'not null' => TRUE,
04462         'default' => 0,
04463       ),
04464       'cvterm_type_id' => array(
04465         'description' => 'TODO: please describe this field!',
04466         'type' => 'int',
04467         'not null' => TRUE,
04468       ),
04469     ),
04470     'primary key' => array(
04471       0 => 'expression_cvterm_id',
04472     ),
04473     'unique keys' => array(
04474       'expression_cvterm_c1' => array(
04475         0 => 'expression_id',
04476         1 => 'cvterm_id',
04477         2 => 'cvterm_type_id',
04478       ),
04479     ),
04480     'indexes' => array(
04481       'expression_cvterm_idx1' => array(
04482         0 => 'expression_id',
04483       ),
04484       'expression_cvterm_idx2' => array(
04485         0 => 'cvterm_id',
04486       ),
04487       'expression_cvterm_idx3' => array(
04488         0 => 'cvterm_type_id',
04489       ),
04490     ),
04491     'foreign keys' => array(
04492       'cvterm' => array(
04493         'table' => 'cvterm',
04494         'columns' => array(
04495           'cvterm_id' => 'cvterm_id',
04496           'cvterm_type_id' => 'cvterm_id',
04497         ),
04498       ),
04499       'expression' => array(
04500         'table' => 'expression',
04501         'columns' => array(
04502           'expression_id' => 'expression_id',
04503         ),
04504       ),
04505     ),
04506     'table' => 'expression_cvterm',
04507     'referring_tables' => array(
04508       0 => 'expression_cvtermprop',
04509     ),
04510   );
04511   return $description;
04512 }
04526 function tripal_core_chado_schema_v1_2_expression_cvtermprop() {
04527   $description =  array(
04528     'description' => 'TODO: please describe this table!',
04529     'fields' => array(
04530       'expression_cvtermprop_id' => array(
04531         'description' => 'TODO: please describe this field!',
04532         'type' => 'serial',
04533         'not null' => TRUE,
04534       ),
04535       'expression_cvterm_id' => array(
04536         'description' => 'TODO: please describe this field!',
04537         'type' => 'int',
04538         'not null' => TRUE,
04539       ),
04540       'type_id' => array(
04541         'description' => 'TODO: please describe this field!',
04542         'type' => 'int',
04543         'not null' => TRUE,
04544       ),
04545       'value' => array(
04546         'description' => 'TODO: please describe this field!',
04547         'type' => 'text',
04548         'not null' => FALSE,
04549       ),
04550       'rank' => array(
04551         'description' => 'TODO: please describe this field!',
04552         'type' => 'int',
04553         'not null' => TRUE,
04554         'default' => 0,
04555       ),
04556     ),
04557     'primary key' => array(
04558       0 => 'expression_cvtermprop_id',
04559     ),
04560     'unique keys' => array(
04561       'expression_cvtermprop_c1' => array(
04562         0 => 'expression_cvterm_id',
04563         1 => 'type_id',
04564         2 => 'rank',
04565       ),
04566     ),
04567     'indexes' => array(
04568       'expression_cvtermprop_idx1' => array(
04569         0 => 'expression_cvterm_id',
04570       ),
04571       'expression_cvtermprop_idx2' => array(
04572         0 => 'type_id',
04573       ),
04574     ),
04575     'foreign keys' => array(
04576       'cvterm' => array(
04577         'table' => 'cvterm',
04578         'columns' => array(
04579           'type_id' => 'cvterm_id',
04580         ),
04581       ),
04582       'expression_cvterm' => array(
04583         'table' => 'expression_cvterm',
04584         'columns' => array(
04585           'expression_cvterm_id' => 'expression_cvterm_id',
04586         ),
04587       ),
04588     ),
04589     'table' => 'expression_cvtermprop',
04590     'referring_tables' => NULL,
04591   );
04592   return $description;
04593 }
04607 function tripal_core_chado_schema_v1_2_expression_image() {
04608   $description =  array(
04609     'description' => 'TODO: please describe this table!',
04610     'fields' => array(
04611       'expression_image_id' => array(
04612         'description' => 'TODO: please describe this field!',
04613         'type' => 'serial',
04614         'not null' => TRUE,
04615       ),
04616       'expression_id' => array(
04617         'description' => 'TODO: please describe this field!',
04618         'type' => 'int',
04619         'not null' => TRUE,
04620       ),
04621       'eimage_id' => array(
04622         'description' => 'TODO: please describe this field!',
04623         'type' => 'int',
04624         'not null' => TRUE,
04625       ),
04626     ),
04627     'primary key' => array(
04628       0 => 'expression_image_id',
04629     ),
04630     'unique keys' => array(
04631       'expression_image_c1' => array(
04632         0 => 'expression_id',
04633         1 => 'eimage_id',
04634       ),
04635     ),
04636     'indexes' => array(
04637       'expression_image_idx1' => array(
04638         0 => 'expression_id',
04639       ),
04640       'expression_image_idx2' => array(
04641         0 => 'eimage_id',
04642       ),
04643     ),
04644     'foreign keys' => array(
04645       'expression' => array(
04646         'table' => 'expression',
04647         'columns' => array(
04648           'expression_id' => 'expression_id',
04649         ),
04650       ),
04651       'eimage' => array(
04652         'table' => 'eimage',
04653         'columns' => array(
04654           'eimage_id' => 'eimage_id',
04655         ),
04656       ),
04657     ),
04658     'table' => 'expression_image',
04659     'referring_tables' => NULL,
04660   );
04661   return $description;
04662 }
04676 function tripal_core_chado_schema_v1_2_expression_pub() {
04677   $description =  array(
04678     'description' => 'TODO: please describe this table!',
04679     'fields' => array(
04680       'expression_pub_id' => array(
04681         'description' => 'TODO: please describe this field!',
04682         'type' => 'serial',
04683         'not null' => TRUE,
04684       ),
04685       'expression_id' => array(
04686         'description' => 'TODO: please describe this field!',
04687         'type' => 'int',
04688         'not null' => TRUE,
04689       ),
04690       'pub_id' => array(
04691         'description' => 'TODO: please describe this field!',
04692         'type' => 'int',
04693         'not null' => TRUE,
04694       ),
04695     ),
04696     'primary key' => array(
04697       0 => 'expression_pub_id',
04698     ),
04699     'unique keys' => array(
04700       'expression_pub_c1' => array(
04701         0 => 'expression_id',
04702         1 => 'pub_id',
04703       ),
04704     ),
04705     'indexes' => array(
04706       'expression_pub_idx1' => array(
04707         0 => 'expression_id',
04708       ),
04709       'expression_pub_idx2' => array(
04710         0 => 'pub_id',
04711       ),
04712     ),
04713     'foreign keys' => array(
04714       'pub' => array(
04715         'table' => 'pub',
04716         'columns' => array(
04717           'pub_id' => 'pub_id',
04718         ),
04719       ),
04720       'expression' => array(
04721         'table' => 'expression',
04722         'columns' => array(
04723           'expression_id' => 'expression_id',
04724         ),
04725       ),
04726     ),
04727     'table' => 'expression_pub',
04728     'referring_tables' => NULL,
04729   );
04730   return $description;
04731 }
04745 function tripal_core_chado_schema_v1_2_expressionprop() {
04746   $description =  array(
04747     'description' => 'TODO: please describe this table!',
04748     'fields' => array(
04749       'expressionprop_id' => array(
04750         'description' => 'TODO: please describe this field!',
04751         'type' => 'serial',
04752         'not null' => TRUE,
04753       ),
04754       'expression_id' => array(
04755         'description' => 'TODO: please describe this field!',
04756         'type' => 'int',
04757         'not null' => TRUE,
04758       ),
04759       'type_id' => array(
04760         'description' => 'TODO: please describe this field!',
04761         'type' => 'int',
04762         'not null' => TRUE,
04763       ),
04764       'value' => array(
04765         'description' => 'TODO: please describe this field!',
04766         'type' => 'text',
04767         'not null' => FALSE,
04768       ),
04769       'rank' => array(
04770         'description' => 'TODO: please describe this field!',
04771         'type' => 'int',
04772         'not null' => TRUE,
04773         'default' => 0,
04774       ),
04775     ),
04776     'primary key' => array(
04777       0 => 'expressionprop_id',
04778     ),
04779     'unique keys' => array(
04780       'expressionprop_c1' => array(
04781         0 => 'expression_id',
04782         1 => 'type_id',
04783         2 => 'rank',
04784       ),
04785     ),
04786     'indexes' => array(
04787       'expressionprop_idx1' => array(
04788         0 => 'expression_id',
04789       ),
04790       'expressionprop_idx2' => array(
04791         0 => 'type_id',
04792       ),
04793     ),
04794     'foreign keys' => array(
04795       'cvterm' => array(
04796         'table' => 'cvterm',
04797         'columns' => array(
04798           'type_id' => 'cvterm_id',
04799         ),
04800       ),
04801       'expression' => array(
04802         'table' => 'expression',
04803         'columns' => array(
04804           'expression_id' => 'expression_id',
04805         ),
04806       ),
04807     ),
04808     'table' => 'expressionprop',
04809     'referring_tables' => NULL,
04810   );
04811   return $description;
04812 }
04826 function tripal_core_chado_schema_v1_2_feature() {
04827   $description =  array(
04828     'description' => 'TODO: please describe this table!',
04829     'fields' => array(
04830       'feature_id' => array(
04831         'description' => 'TODO: please describe this field!',
04832         'type' => 'serial',
04833         'not null' => TRUE,
04834       ),
04835       'dbxref_id' => array(
04836         'description' => 'TODO: please describe this field!',
04837         'type' => 'int',
04838         'not null' => FALSE,
04839       ),
04840       'organism_id' => array(
04841         'description' => 'TODO: please describe this field!',
04842         'type' => 'int',
04843         'not null' => TRUE,
04844       ),
04845       'name' => array(
04846         'description' => 'TODO: please describe this field!',
04847         'type' => 'varchar',
04848         'length' => '255',
04849         'not null' => FALSE,
04850       ),
04851       'uniquename' => array(
04852         'description' => 'TODO: please describe this field!',
04853         'type' => 'text',
04854         'not null' => TRUE,
04855       ),
04856       'residues' => array(
04857         'description' => 'TODO: please describe this field!',
04858         'type' => 'text',
04859         'not null' => FALSE,
04860       ),
04861       'seqlen' => array(
04862         'description' => 'TODO: please describe this field!',
04863         'type' => 'int',
04864         'not null' => FALSE,
04865       ),
04866       'md5checksum' => array(
04867         'description' => 'TODO: please describe this field!',
04868         'type' => 'char',
04869         'length' => '32',
04870         'not null' => FALSE,
04871       ),
04872       'type_id' => array(
04873         'description' => 'TODO: please describe this field!',
04874         'type' => 'int',
04875         'not null' => TRUE,
04876       ),
04877       'is_analysis' => array(
04878         'description' => 'TODO: please describe this field!',
04879         'type' => 'boolean',
04880         'not null' => TRUE,
04881         'default' => 'als',
04882       ),
04883       'is_obsolete' => array(
04884         'description' => 'TODO: please describe this field!',
04885         'type' => 'boolean',
04886         'not null' => TRUE,
04887         'default' => 'als',
04888       ),
04889       'timeaccessioned' => array(
04890         'description' => 'TODO: please describe this field!',
04891         'type' => 'datetime',
04892         'not null' => TRUE,
04893         'default' => 'ow(',
04894       ),
04895       'timelastmodified' => array(
04896         'description' => 'TODO: please describe this field!',
04897         'type' => 'datetime',
04898         'not null' => TRUE,
04899         'default' => 'ow(',
04900       ),
04901     ),
04902     'primary key' => array(
04903       0 => 'feature_id',
04904     ),
04905     'unique keys' => array(
04906       'feature_c1' => array(
04907         0 => 'organism_id',
04908         1 => 'uniquename',
04909         2 => 'type_id',
04910       ),
04911     ),
04912     'indexes' => array(
04913       'feature_idx1' => array(
04914         0 => 'dbxref_id',
04915       ),
04916       'feature_idx2' => array(
04917         0 => 'organism_id',
04918       ),
04919       'feature_idx3' => array(
04920         0 => 'type_id',
04921       ),
04922       'feature_idx4' => array(
04923         0 => 'uniquename',
04924       ),
04925       'feature_name_ind1' => array(
04926         0 => 'name',
04927       ),
04928     ),
04929     'foreign keys' => array(
04930       'organism' => array(
04931         'table' => 'organism',
04932         'columns' => array(
04933           'organism_id' => 'organism_id',
04934         ),
04935       ),
04936       'cvterm' => array(
04937         'table' => 'cvterm',
04938         'columns' => array(
04939           'type_id' => 'cvterm_id',
04940         ),
04941       ),
04942       'dbxref' => array(
04943         'table' => 'dbxref',
04944         'columns' => array(
04945           'dbxref_id' => 'dbxref_id',
04946         ),
04947       ),
04948     ),
04949     'table' => 'feature',
04950     'referring_tables' => array(
04951       0 => 'analysisfeature',
04952       1 => 'cell_line_feature',
04953       2 => 'element',
04954       3 => 'feature_cvterm',
04955       4 => 'feature_dbxref',
04956       5 => 'feature_expression',
04957       6 => 'feature_genotype',
04958       8 => 'feature_phenotype',
04959       9 => 'feature_pub',
04960       10 => 'feature_relationship',
04961       12 => 'feature_synonym',
04962       13 => 'featureloc',
04963       15 => 'featurepos',
04964       17 => 'featureprop',
04965       18 => 'featurerange',
04966       23 => 'library_feature',
04967       24 => 'phylonode',
04968       25 => 'studyprop_feature',
04969     ),
04970   );
04971   return $description;
04972 }
04986 function tripal_core_chado_schema_v1_2_feature_cvterm() {
04987   $description =  array(
04988     'description' => 'TODO: please describe this table!',
04989     'fields' => array(
04990       'feature_cvterm_id' => array(
04991         'description' => 'TODO: please describe this field!',
04992         'type' => 'serial',
04993         'not null' => TRUE,
04994       ),
04995       'feature_id' => array(
04996         'description' => 'TODO: please describe this field!',
04997         'type' => 'int',
04998         'not null' => TRUE,
04999       ),
05000       'cvterm_id' => array(
05001         'description' => 'TODO: please describe this field!',
05002         'type' => 'int',
05003         'not null' => TRUE,
05004       ),
05005       'pub_id' => array(
05006         'description' => 'TODO: please describe this field!',
05007         'type' => 'int',
05008         'not null' => TRUE,
05009       ),
05010       'is_not' => array(
05011         'description' => 'TODO: please describe this field!',
05012         'type' => 'boolean',
05013         'not null' => TRUE,
05014         'default' => 'als',
05015       ),
05016       'rank' => array(
05017         'description' => 'TODO: please describe this field!',
05018         'type' => 'int',
05019         'not null' => TRUE,
05020         'default' => 0,
05021       ),
05022     ),
05023     'primary key' => array(
05024       0 => 'feature_cvterm_id',
05025     ),
05026     'unique keys' => array(
05027       'feature_cvterm_c1' => array(
05028         0 => 'feature_id',
05029         1 => 'cvterm_id',
05030         2 => 'pub_id',
05031         3 => 'rank',
05032       ),
05033     ),
05034     'indexes' => array(
05035       'feature_cvterm_idx1' => array(
05036         0 => 'feature_id',
05037       ),
05038       'feature_cvterm_idx2' => array(
05039         0 => 'cvterm_id',
05040       ),
05041       'feature_cvterm_idx3' => array(
05042         0 => 'pub_id',
05043       ),
05044     ),
05045     'foreign keys' => array(
05046       'cvterm' => array(
05047         'table' => 'cvterm',
05048         'columns' => array(
05049           'cvterm_id' => 'cvterm_id',
05050         ),
05051       ),
05052       'pub' => array(
05053         'table' => 'pub',
05054         'columns' => array(
05055           'pub_id' => 'pub_id',
05056         ),
05057       ),
05058       'feature' => array(
05059         'table' => 'feature',
05060         'columns' => array(
05061           'feature_id' => 'feature_id',
05062         ),
05063       ),
05064     ),
05065     'table' => 'feature_cvterm',
05066     'referring_tables' => array(
05067       0 => 'feature_cvterm_dbxref',
05068       1 => 'feature_cvterm_pub',
05069       2 => 'feature_cvtermprop',
05070     ),
05071   );
05072   return $description;
05073 }
05087 function tripal_core_chado_schema_v1_2_feature_cvterm_dbxref() {
05088   $description =  array(
05089     'description' => 'TODO: please describe this table!',
05090     'fields' => array(
05091       'feature_cvterm_dbxref_id' => array(
05092         'description' => 'TODO: please describe this field!',
05093         'type' => 'serial',
05094         'not null' => TRUE,
05095       ),
05096       'feature_cvterm_id' => array(
05097         'description' => 'TODO: please describe this field!',
05098         'type' => 'int',
05099         'not null' => TRUE,
05100       ),
05101       'dbxref_id' => array(
05102         'description' => 'TODO: please describe this field!',
05103         'type' => 'int',
05104         'not null' => TRUE,
05105       ),
05106     ),
05107     'primary key' => array(
05108       0 => 'feature_cvterm_dbxref_id',
05109     ),
05110     'unique keys' => array(
05111       'feature_cvterm_dbxref_c1' => array(
05112         0 => 'feature_cvterm_id',
05113         1 => 'dbxref_id',
05114       ),
05115     ),
05116     'indexes' => array(
05117       'feature_cvterm_dbxref_idx1' => array(
05118         0 => 'feature_cvterm_id',
05119       ),
05120       'feature_cvterm_dbxref_idx2' => array(
05121         0 => 'dbxref_id',
05122       ),
05123     ),
05124     'foreign keys' => array(
05125       'feature_cvterm' => array(
05126         'table' => 'feature_cvterm',
05127         'columns' => array(
05128           'feature_cvterm_id' => 'feature_cvterm_id',
05129         ),
05130       ),
05131       'dbxref' => array(
05132         'table' => 'dbxref',
05133         'columns' => array(
05134           'dbxref_id' => 'dbxref_id',
05135         ),
05136       ),
05137     ),
05138     'table' => 'feature_cvterm_dbxref',
05139     'referring_tables' => NULL,
05140   );
05141   return $description;
05142 }
05156 function tripal_core_chado_schema_v1_2_feature_cvterm_pub() {
05157   $description =  array(
05158     'description' => 'TODO: please describe this table!',
05159     'fields' => array(
05160       'feature_cvterm_pub_id' => array(
05161         'description' => 'TODO: please describe this field!',
05162         'type' => 'serial',
05163         'not null' => TRUE,
05164       ),
05165       'feature_cvterm_id' => array(
05166         'description' => 'TODO: please describe this field!',
05167         'type' => 'int',
05168         'not null' => TRUE,
05169       ),
05170       'pub_id' => array(
05171         'description' => 'TODO: please describe this field!',
05172         'type' => 'int',
05173         'not null' => TRUE,
05174       ),
05175     ),
05176     'primary key' => array(
05177       0 => 'feature_cvterm_pub_id',
05178     ),
05179     'unique keys' => array(
05180       'feature_cvterm_pub_c1' => array(
05181         0 => 'feature_cvterm_id',
05182         1 => 'pub_id',
05183       ),
05184     ),
05185     'indexes' => array(
05186       'feature_cvterm_pub_idx1' => array(
05187         0 => 'feature_cvterm_id',
05188       ),
05189       'feature_cvterm_pub_idx2' => array(
05190         0 => 'pub_id',
05191       ),
05192     ),
05193     'foreign keys' => array(
05194       'feature_cvterm' => array(
05195         'table' => 'feature_cvterm',
05196         'columns' => array(
05197           'feature_cvterm_id' => 'feature_cvterm_id',
05198         ),
05199       ),
05200       'pub' => array(
05201         'table' => 'pub',
05202         'columns' => array(
05203           'pub_id' => 'pub_id',
05204         ),
05205       ),
05206     ),
05207     'table' => 'feature_cvterm_pub',
05208     'referring_tables' => NULL,
05209   );
05210   return $description;
05211 }
05225 function tripal_core_chado_schema_v1_2_feature_cvtermprop() {
05226   $description =  array(
05227     'description' => 'TODO: please describe this table!',
05228     'fields' => array(
05229       'feature_cvtermprop_id' => array(
05230         'description' => 'TODO: please describe this field!',
05231         'type' => 'serial',
05232         'not null' => TRUE,
05233       ),
05234       'feature_cvterm_id' => array(
05235         'description' => 'TODO: please describe this field!',
05236         'type' => 'int',
05237         'not null' => TRUE,
05238       ),
05239       'type_id' => array(
05240         'description' => 'TODO: please describe this field!',
05241         'type' => 'int',
05242         'not null' => TRUE,
05243       ),
05244       'value' => array(
05245         'description' => 'TODO: please describe this field!',
05246         'type' => 'text',
05247         'not null' => FALSE,
05248       ),
05249       'rank' => array(
05250         'description' => 'TODO: please describe this field!',
05251         'type' => 'int',
05252         'not null' => TRUE,
05253         'default' => 0,
05254       ),
05255     ),
05256     'primary key' => array(
05257       0 => 'feature_cvtermprop_id',
05258     ),
05259     'unique keys' => array(
05260       'feature_cvtermprop_c1' => array(
05261         0 => 'feature_cvterm_id',
05262         1 => 'type_id',
05263         2 => 'rank',
05264       ),
05265     ),
05266     'indexes' => array(
05267       'feature_cvtermprop_idx1' => array(
05268         0 => 'feature_cvterm_id',
05269       ),
05270       'feature_cvtermprop_idx2' => array(
05271         0 => 'type_id',
05272       ),
05273     ),
05274     'foreign keys' => array(
05275       'cvterm' => array(
05276         'table' => 'cvterm',
05277         'columns' => array(
05278           'type_id' => 'cvterm_id',
05279         ),
05280       ),
05281       'feature_cvterm' => array(
05282         'table' => 'feature_cvterm',
05283         'columns' => array(
05284           'feature_cvterm_id' => 'feature_cvterm_id',
05285         ),
05286       ),
05287     ),
05288     'table' => 'feature_cvtermprop',
05289     'referring_tables' => NULL,
05290   );
05291   return $description;
05292 }
05306 function tripal_core_chado_schema_v1_2_feature_dbxref() {
05307   $description =  array(
05308     'description' => 'TODO: please describe this table!',
05309     'fields' => array(
05310       'feature_dbxref_id' => array(
05311         'description' => 'TODO: please describe this field!',
05312         'type' => 'serial',
05313         'not null' => TRUE,
05314       ),
05315       'feature_id' => array(
05316         'description' => 'TODO: please describe this field!',
05317         'type' => 'int',
05318         'not null' => TRUE,
05319       ),
05320       'dbxref_id' => array(
05321         'description' => 'TODO: please describe this field!',
05322         'type' => 'int',
05323         'not null' => TRUE,
05324       ),
05325       'is_current' => array(
05326         'description' => 'TODO: please describe this field!',
05327         'type' => 'boolean',
05328         'not null' => TRUE,
05329         'default' => 'ru',
05330       ),
05331     ),
05332     'primary key' => array(
05333       0 => 'feature_dbxref_id',
05334     ),
05335     'unique keys' => array(
05336       'feature_dbxref_c1' => array(
05337         0 => 'feature_id',
05338         1 => 'dbxref_id',
05339       ),
05340     ),
05341     'indexes' => array(
05342       'feature_dbxref_idx1' => array(
05343         0 => 'feature_id',
05344       ),
05345       'feature_dbxref_idx2' => array(
05346         0 => 'dbxref_id',
05347       ),
05348     ),
05349     'foreign keys' => array(
05350       'dbxref' => array(
05351         'table' => 'dbxref',
05352         'columns' => array(
05353           'dbxref_id' => 'dbxref_id',
05354         ),
05355       ),
05356       'feature' => array(
05357         'table' => 'feature',
05358         'columns' => array(
05359           'feature_id' => 'feature_id',
05360         ),
05361       ),
05362     ),
05363     'table' => 'feature_dbxref',
05364     'referring_tables' => NULL,
05365   );
05366   return $description;
05367 }
05381 function tripal_core_chado_schema_v1_2_feature_expression() {
05382   $description =  array(
05383     'description' => 'TODO: please describe this table!',
05384     'fields' => array(
05385       'feature_expression_id' => array(
05386         'description' => 'TODO: please describe this field!',
05387         'type' => 'serial',
05388         'not null' => TRUE,
05389       ),
05390       'expression_id' => array(
05391         'description' => 'TODO: please describe this field!',
05392         'type' => 'int',
05393         'not null' => TRUE,
05394       ),
05395       'feature_id' => array(
05396         'description' => 'TODO: please describe this field!',
05397         'type' => 'int',
05398         'not null' => TRUE,
05399       ),
05400       'pub_id' => array(
05401         'description' => 'TODO: please describe this field!',
05402         'type' => 'int',
05403         'not null' => TRUE,
05404       ),
05405     ),
05406     'primary key' => array(
05407       0 => 'feature_expression_id',
05408     ),
05409     'unique keys' => array(
05410       'feature_expression_c1' => array(
05411         0 => 'expression_id',
05412         1 => 'feature_id',
05413         2 => 'pub_id',
05414       ),
05415     ),
05416     'indexes' => array(
05417       'feature_expression_idx1' => array(
05418         0 => 'expression_id',
05419       ),
05420       'feature_expression_idx2' => array(
05421         0 => 'feature_id',
05422       ),
05423       'feature_expression_idx3' => array(
05424         0 => 'pub_id',
05425       ),
05426     ),
05427     'foreign keys' => array(
05428       'pub' => array(
05429         'table' => 'pub',
05430         'columns' => array(
05431           'pub_id' => 'pub_id',
05432         ),
05433       ),
05434       'feature' => array(
05435         'table' => 'feature',
05436         'columns' => array(
05437           'feature_id' => 'feature_id',
05438         ),
05439       ),
05440       'expression' => array(
05441         'table' => 'expression',
05442         'columns' => array(
05443           'expression_id' => 'expression_id',
05444         ),
05445       ),
05446     ),
05447     'table' => 'feature_expression',
05448     'referring_tables' => array(
05449       0 => 'feature_expressionprop',
05450     ),
05451   );
05452   return $description;
05453 }
05467 function tripal_core_chado_schema_v1_2_feature_expressionprop() {
05468   $description =  array(
05469     'description' => 'TODO: please describe this table!',
05470     'fields' => array(
05471       'feature_expressionprop_id' => array(
05472         'description' => 'TODO: please describe this field!',
05473         'type' => 'serial',
05474         'not null' => TRUE,
05475       ),
05476       'feature_expression_id' => array(
05477         'description' => 'TODO: please describe this field!',
05478         'type' => 'int',
05479         'not null' => TRUE,
05480       ),
05481       'type_id' => array(
05482         'description' => 'TODO: please describe this field!',
05483         'type' => 'int',
05484         'not null' => TRUE,
05485       ),
05486       'value' => array(
05487         'description' => 'TODO: please describe this field!',
05488         'type' => 'text',
05489         'not null' => FALSE,
05490       ),
05491       'rank' => array(
05492         'description' => 'TODO: please describe this field!',
05493         'type' => 'int',
05494         'not null' => TRUE,
05495         'default' => 0,
05496       ),
05497     ),
05498     'primary key' => array(
05499       0 => 'feature_expressionprop_id',
05500     ),
05501     'unique keys' => array(
05502       'feature_expressionprop_c1' => array(
05503         0 => 'feature_expression_id',
05504         1 => 'type_id',
05505         2 => 'rank',
05506       ),
05507     ),
05508     'indexes' => array(
05509       'feature_expressionprop_idx1' => array(
05510         0 => 'feature_expression_id',
05511       ),
05512       'feature_expressionprop_idx2' => array(
05513         0 => 'type_id',
05514       ),
05515     ),
05516     'foreign keys' => array(
05517       'cvterm' => array(
05518         'table' => 'cvterm',
05519         'columns' => array(
05520           'type_id' => 'cvterm_id',
05521         ),
05522       ),
05523       'feature_expression' => array(
05524         'table' => 'feature_expression',
05525         'columns' => array(
05526           'feature_expression_id' => 'feature_expression_id',
05527         ),
05528       ),
05529     ),
05530     'table' => 'feature_expressionprop',
05531     'referring_tables' => NULL,
05532   );
05533   return $description;
05534 }
05548 function tripal_core_chado_schema_v1_2_feature_genotype() {
05549   $description =  array(
05550     'description' => 'TODO: please describe this table!',
05551     'fields' => array(
05552       'feature_genotype_id' => array(
05553         'description' => 'TODO: please describe this field!',
05554         'type' => 'serial',
05555         'not null' => TRUE,
05556       ),
05557       'feature_id' => array(
05558         'description' => 'TODO: please describe this field!',
05559         'type' => 'int',
05560         'not null' => TRUE,
05561       ),
05562       'genotype_id' => array(
05563         'description' => 'TODO: please describe this field!',
05564         'type' => 'int',
05565         'not null' => TRUE,
05566       ),
05567       'chromosome_id' => array(
05568         'description' => 'TODO: please describe this field!',
05569         'type' => 'int',
05570         'not null' => FALSE,
05571       ),
05572       'rank' => array(
05573         'description' => 'TODO: please describe this field!',
05574         'type' => 'int',
05575         'not null' => TRUE,
05576       ),
05577       'cgroup' => array(
05578         'description' => 'TODO: please describe this field!',
05579         'type' => 'int',
05580         'not null' => TRUE,
05581       ),
05582       'cvterm_id' => array(
05583         'description' => 'TODO: please describe this field!',
05584         'type' => 'int',
05585         'not null' => TRUE,
05586       ),
05587     ),
05588     'primary key' => array(
05589       0 => 'feature_genotype_id',
05590     ),
05591     'unique keys' => array(
05592       'feature_genotype_c1' => array(
05593         0 => 'feature_id',
05594         1 => 'genotype_id',
05595         2 => 'cvterm_id',
05596         3 => 'chromosome_id',
05597         4 => 'rank',
05598         5 => 'cgroup',
05599       ),
05600     ),
05601     'indexes' => array(
05602       'feature_genotype_idx1' => array(
05603         0 => 'feature_id',
05604       ),
05605       'feature_genotype_idx2' => array(
05606         0 => 'genotype_id',
05607       ),
05608     ),
05609     'foreign keys' => array(
05610       'cvterm' => array(
05611         'table' => 'cvterm',
05612         'columns' => array(
05613           'cvterm_id' => 'cvterm_id',
05614         ),
05615       ),
05616       'feature' => array(
05617         'table' => 'feature',
05618         'columns' => array(
05619           'feature_id' => 'feature_id',
05620           'chromosome_id' => 'feature_id',
05621         ),
05622       ),
05623       'genotype' => array(
05624         'table' => 'genotype',
05625         'columns' => array(
05626           'genotype_id' => 'genotype_id',
05627         ),
05628       ),
05629     ),
05630     'table' => 'feature_genotype',
05631     'referring_tables' => NULL,
05632   );
05633   return $description;
05634 }
05648 function tripal_core_chado_schema_v1_2_feature_phenotype() {
05649   $description =  array(
05650     'description' => 'TODO: please describe this table!',
05651     'fields' => array(
05652       'feature_phenotype_id' => array(
05653         'description' => 'TODO: please describe this field!',
05654         'type' => 'serial',
05655         'not null' => TRUE,
05656       ),
05657       'feature_id' => array(
05658         'description' => 'TODO: please describe this field!',
05659         'type' => 'int',
05660         'not null' => TRUE,
05661       ),
05662       'phenotype_id' => array(
05663         'description' => 'TODO: please describe this field!',
05664         'type' => 'int',
05665         'not null' => TRUE,
05666       ),
05667     ),
05668     'primary key' => array(
05669       0 => 'feature_phenotype_id',
05670     ),
05671     'unique keys' => array(
05672       'feature_phenotype_c1' => array(
05673         0 => 'feature_id',
05674         1 => 'phenotype_id',
05675       ),
05676     ),
05677     'indexes' => array(
05678       'feature_phenotype_idx1' => array(
05679         0 => 'feature_id',
05680       ),
05681       'feature_phenotype_idx2' => array(
05682         0 => 'phenotype_id',
05683       ),
05684     ),
05685     'foreign keys' => array(
05686       'feature' => array(
05687         'table' => 'feature',
05688         'columns' => array(
05689           'feature_id' => 'feature_id',
05690         ),
05691       ),
05692       'phenotype' => array(
05693         'table' => 'phenotype',
05694         'columns' => array(
05695           'phenotype_id' => 'phenotype_id',
05696         ),
05697       ),
05698     ),
05699     'table' => 'feature_phenotype',
05700     'referring_tables' => NULL,
05701   );
05702   return $description;
05703 }
05717 function tripal_core_chado_schema_v1_2_feature_pub() {
05718   $description =  array(
05719     'description' => 'TODO: please describe this table!',
05720     'fields' => array(
05721       'feature_pub_id' => array(
05722         'description' => 'TODO: please describe this field!',
05723         'type' => 'serial',
05724         'not null' => TRUE,
05725       ),
05726       'feature_id' => array(
05727         'description' => 'TODO: please describe this field!',
05728         'type' => 'int',
05729         'not null' => TRUE,
05730       ),
05731       'pub_id' => array(
05732         'description' => 'TODO: please describe this field!',
05733         'type' => 'int',
05734         'not null' => TRUE,
05735       ),
05736     ),
05737     'primary key' => array(
05738       0 => 'feature_pub_id',
05739     ),
05740     'unique keys' => array(
05741       'feature_pub_c1' => array(
05742         0 => 'feature_id',
05743         1 => 'pub_id',
05744       ),
05745     ),
05746     'indexes' => array(
05747       'feature_pub_idx1' => array(
05748         0 => 'feature_id',
05749       ),
05750       'feature_pub_idx2' => array(
05751         0 => 'pub_id',
05752       ),
05753     ),
05754     'foreign keys' => array(
05755       'pub' => array(
05756         'table' => 'pub',
05757         'columns' => array(
05758           'pub_id' => 'pub_id',
05759         ),
05760       ),
05761       'feature' => array(
05762         'table' => 'feature',
05763         'columns' => array(
05764           'feature_id' => 'feature_id',
05765         ),
05766       ),
05767     ),
05768     'table' => 'feature_pub',
05769     'referring_tables' => array(
05770       0 => 'feature_pubprop',
05771     ),
05772   );
05773   return $description;
05774 }
05788 function tripal_core_chado_schema_v1_2_feature_pubprop() {
05789   $description =  array(
05790     'description' => 'TODO: please describe this table!',
05791     'fields' => array(
05792       'feature_pubprop_id' => array(
05793         'description' => 'TODO: please describe this field!',
05794         'type' => 'serial',
05795         'not null' => TRUE,
05796       ),
05797       'feature_pub_id' => array(
05798         'description' => 'TODO: please describe this field!',
05799         'type' => 'int',
05800         'not null' => TRUE,
05801       ),
05802       'type_id' => array(
05803         'description' => 'TODO: please describe this field!',
05804         'type' => 'int',
05805         'not null' => TRUE,
05806       ),
05807       'value' => array(
05808         'description' => 'TODO: please describe this field!',
05809         'type' => 'text',
05810         'not null' => FALSE,
05811       ),
05812       'rank' => array(
05813         'description' => 'TODO: please describe this field!',
05814         'type' => 'int',
05815         'not null' => TRUE,
05816         'default' => 0,
05817       ),
05818     ),
05819     'primary key' => array(
05820       0 => 'feature_pubprop_id',
05821     ),
05822     'unique keys' => array(
05823       'feature_pubprop_c1' => array(
05824         0 => 'feature_pub_id',
05825         1 => 'type_id',
05826         2 => 'rank',
05827       ),
05828     ),
05829     'indexes' => array(
05830       'feature_pubprop_idx1' => array(
05831         0 => 'feature_pub_id',
05832       ),
05833     ),
05834     'foreign keys' => array(
05835       'cvterm' => array(
05836         'table' => 'cvterm',
05837         'columns' => array(
05838           'type_id' => 'cvterm_id',
05839         ),
05840       ),
05841       'feature_pub' => array(
05842         'table' => 'feature_pub',
05843         'columns' => array(
05844           'feature_pub_id' => 'feature_pub_id',
05845         ),
05846       ),
05847     ),
05848     'table' => 'feature_pubprop',
05849     'referring_tables' => NULL,
05850   );
05851   return $description;
05852 }
05866 function tripal_core_chado_schema_v1_2_feature_relationship() {
05867   $description =  array(
05868     'description' => 'TODO: please describe this table!',
05869     'fields' => array(
05870       'feature_relationship_id' => array(
05871         'description' => 'TODO: please describe this field!',
05872         'type' => 'serial',
05873         'not null' => TRUE,
05874       ),
05875       'subject_id' => array(
05876         'description' => 'TODO: please describe this field!',
05877         'type' => 'int',
05878         'not null' => TRUE,
05879       ),
05880       'object_id' => array(
05881         'description' => 'TODO: please describe this field!',
05882         'type' => 'int',
05883         'not null' => TRUE,
05884       ),
05885       'type_id' => array(
05886         'description' => 'TODO: please describe this field!',
05887         'type' => 'int',
05888         'not null' => TRUE,
05889       ),
05890       'value' => array(
05891         'description' => 'TODO: please describe this field!',
05892         'type' => 'text',
05893         'not null' => FALSE,
05894       ),
05895       'rank' => array(
05896         'description' => 'TODO: please describe this field!',
05897         'type' => 'int',
05898         'not null' => TRUE,
05899         'default' => 0,
05900       ),
05901     ),
05902     'primary key' => array(
05903       0 => 'feature_relationship_id',
05904     ),
05905     'unique keys' => array(
05906       'feature_relationship_c1' => array(
05907         0 => 'subject_id',
05908         1 => 'object_id',
05909         2 => 'type_id',
05910         3 => 'rank',
05911       ),
05912     ),
05913     'indexes' => array(
05914       'feature_relationship_idx1' => array(
05915         0 => 'subject_id',
05916       ),
05917       'feature_relationship_idx2' => array(
05918         0 => 'object_id',
05919       ),
05920       'feature_relationship_idx3' => array(
05921         0 => 'type_id',
05922       ),
05923     ),
05924     'foreign keys' => array(
05925       'cvterm' => array(
05926         'table' => 'cvterm',
05927         'columns' => array(
05928           'type_id' => 'cvterm_id',
05929         ),
05930       ),
05931       'feature' => array(
05932         'table' => 'feature',
05933         'columns' => array(
05934           'subject_id' => 'feature_id',
05935           'object_id' => 'feature_id',
05936         ),
05937       ),
05938     ),
05939     'table' => 'feature_relationship',
05940     'referring_tables' => array(
05941       0 => 'feature_relationship_pub',
05942       1 => 'feature_relationshipprop',
05943     ),
05944   );
05945   return $description;
05946 }
05960 function tripal_core_chado_schema_v1_2_feature_relationship_pub() {
05961   $description =  array(
05962     'description' => 'TODO: please describe this table!',
05963     'fields' => array(
05964       'feature_relationship_pub_id' => array(
05965         'description' => 'TODO: please describe this field!',
05966         'type' => 'serial',
05967         'not null' => TRUE,
05968       ),
05969       'feature_relationship_id' => array(
05970         'description' => 'TODO: please describe this field!',
05971         'type' => 'int',
05972         'not null' => TRUE,
05973       ),
05974       'pub_id' => array(
05975         'description' => 'TODO: please describe this field!',
05976         'type' => 'int',
05977         'not null' => TRUE,
05978       ),
05979     ),
05980     'primary key' => array(
05981       0 => 'feature_relationship_pub_id',
05982     ),
05983     'unique keys' => array(
05984       'feature_relationship_pub_c1' => array(
05985         0 => 'feature_relationship_id',
05986         1 => 'pub_id',
05987       ),
05988     ),
05989     'indexes' => array(
05990       'feature_relationship_pub_idx1' => array(
05991         0 => 'feature_relationship_id',
05992       ),
05993       'feature_relationship_pub_idx2' => array(
05994         0 => 'pub_id',
05995       ),
05996     ),
05997     'foreign keys' => array(
05998       'feature_relationship' => array(
05999         'table' => 'feature_relationship',
06000         'columns' => array(
06001           'feature_relationship_id' => 'feature_relationship_id',
06002         ),
06003       ),
06004       'pub' => array(
06005         'table' => 'pub',
06006         'columns' => array(
06007           'pub_id' => 'pub_id',
06008         ),
06009       ),
06010     ),
06011     'table' => 'feature_relationship_pub',
06012     'referring_tables' => NULL,
06013   );
06014   return $description;
06015 }
06029 function tripal_core_chado_schema_v1_2_feature_relationshipprop() {
06030   $description =  array(
06031     'description' => 'TODO: please describe this table!',
06032     'fields' => array(
06033       'feature_relationshipprop_id' => array(
06034         'description' => 'TODO: please describe this field!',
06035         'type' => 'serial',
06036         'not null' => TRUE,
06037       ),
06038       'feature_relationship_id' => array(
06039         'description' => 'TODO: please describe this field!',
06040         'type' => 'int',
06041         'not null' => TRUE,
06042       ),
06043       'type_id' => array(
06044         'description' => 'TODO: please describe this field!',
06045         'type' => 'int',
06046         'not null' => TRUE,
06047       ),
06048       'value' => array(
06049         'description' => 'TODO: please describe this field!',
06050         'type' => 'text',
06051         'not null' => FALSE,
06052       ),
06053       'rank' => array(
06054         'description' => 'TODO: please describe this field!',
06055         'type' => 'int',
06056         'not null' => TRUE,
06057         'default' => 0,
06058       ),
06059     ),
06060     'primary key' => array(
06061       0 => 'feature_relationshipprop_id',
06062     ),
06063     'unique keys' => array(
06064       'feature_relationshipprop_c1' => array(
06065         0 => 'feature_relationship_id',
06066         1 => 'type_id',
06067         2 => 'rank',
06068       ),
06069     ),
06070     'indexes' => array(
06071       'feature_relationshipprop_idx1' => array(
06072         0 => 'feature_relationship_id',
06073       ),
06074       'feature_relationshipprop_idx2' => array(
06075         0 => 'type_id',
06076       ),
06077     ),
06078     'foreign keys' => array(
06079       'cvterm' => array(
06080         'table' => 'cvterm',
06081         'columns' => array(
06082           'type_id' => 'cvterm_id',
06083         ),
06084       ),
06085       'feature_relationship' => array(
06086         'table' => 'feature_relationship',
06087         'columns' => array(
06088           'feature_relationship_id' => 'feature_relationship_id',
06089         ),
06090       ),
06091     ),
06092     'table' => 'feature_relationshipprop',
06093     'referring_tables' => array(
06094       0 => 'feature_relationshipprop_pub',
06095     ),
06096   );
06097   return $description;
06098 }
06112 function tripal_core_chado_schema_v1_2_feature_relationshipprop_pub() {
06113   $description =  array(
06114     'description' => 'TODO: please describe this table!',
06115     'fields' => array(
06116       'feature_relationshipprop_pub_id' => array(
06117         'description' => 'TODO: please describe this field!',
06118         'type' => 'serial',
06119         'not null' => TRUE,
06120       ),
06121       'feature_relationshipprop_id' => array(
06122         'description' => 'TODO: please describe this field!',
06123         'type' => 'int',
06124         'not null' => TRUE,
06125       ),
06126       'pub_id' => array(
06127         'description' => 'TODO: please describe this field!',
06128         'type' => 'int',
06129         'not null' => TRUE,
06130       ),
06131     ),
06132     'primary key' => array(
06133       0 => 'feature_relationshipprop_pub_id',
06134     ),
06135     'unique keys' => array(
06136       'feature_relationshipprop_pub_c1' => array(
06137         0 => 'feature_relationshipprop_id',
06138         1 => 'pub_id',
06139       ),
06140     ),
06141     'indexes' => array(
06142       'feature_relationshipprop_pub_idx1' => array(
06143         0 => 'feature_relationshipprop_id',
06144       ),
06145       'feature_relationshipprop_pub_idx2' => array(
06146         0 => 'pub_id',
06147       ),
06148     ),
06149     'foreign keys' => array(
06150       'feature_relationshipprop' => array(
06151         'table' => 'feature_relationshipprop',
06152         'columns' => array(
06153           'feature_relationshipprop_id' => 'feature_relationshipprop_id',
06154         ),
06155       ),
06156       'pub' => array(
06157         'table' => 'pub',
06158         'columns' => array(
06159           'pub_id' => 'pub_id',
06160         ),
06161       ),
06162     ),
06163     'table' => 'feature_relationshipprop_pub',
06164     'referring_tables' => NULL,
06165   );
06166   return $description;
06167 }
06168 
06182 function tripal_core_chado_schema_v1_2_feature_synonym() {
06183   $description =  array(
06184     'description' => 'TODO: please describe this table!',
06185     'fields' => array(
06186       'feature_synonym_id' => array(
06187         'description' => 'TODO: please describe this field!',
06188         'type' => 'serial',
06189         'not null' => TRUE,
06190       ),
06191       'synonym_id' => array(
06192         'description' => 'TODO: please describe this field!',
06193         'type' => 'int',
06194         'not null' => TRUE,
06195       ),
06196       'feature_id' => array(
06197         'description' => 'TODO: please describe this field!',
06198         'type' => 'int',
06199         'not null' => TRUE,
06200       ),
06201       'pub_id' => array(
06202         'description' => 'TODO: please describe this field!',
06203         'type' => 'int',
06204         'not null' => TRUE,
06205       ),
06206       'is_current' => array(
06207         'description' => 'TODO: please describe this field!',
06208         'type' => 'boolean',
06209         'not null' => TRUE,
06210         'default' => 'als',
06211       ),
06212       'is_internal' => array(
06213         'description' => 'TODO: please describe this field!',
06214         'type' => 'boolean',
06215         'not null' => TRUE,
06216         'default' => 'als',
06217       ),
06218     ),
06219     'primary key' => array(
06220       0 => 'feature_synonym_id',
06221     ),
06222     'unique keys' => array(
06223       'feature_synonym_c1' => array(
06224         0 => 'synonym_id',
06225         1 => 'feature_id',
06226         2 => 'pub_id',
06227       ),
06228     ),
06229     'indexes' => array(
06230       'feature_synonym_idx1' => array(
06231         0 => 'synonym_id',
06232       ),
06233       'feature_synonym_idx2' => array(
06234         0 => 'feature_id',
06235       ),
06236       'feature_synonym_idx3' => array(
06237         0 => 'pub_id',
06238       ),
06239     ),
06240     'foreign keys' => array(
06241       'pub' => array(
06242         'table' => 'pub',
06243         'columns' => array(
06244           'pub_id' => 'pub_id',
06245         ),
06246       ),
06247       'feature' => array(
06248         'table' => 'feature',
06249         'columns' => array(
06250           'feature_id' => 'feature_id',
06251         ),
06252       ),
06253       'synonym' => array(
06254         'table' => 'synonym',
06255         'columns' => array(
06256           'synonym_id' => 'synonym_id',
06257         ),
06258       ),
06259     ),
06260     'table' => 'feature_synonym',
06261     'referring_tables' => NULL,
06262   );
06263   return $description;
06264 }
06278 function tripal_core_chado_schema_v1_2_featureloc() {
06279   $description =  array(
06280     'description' => 'TODO: please describe this table!',
06281     'fields' => array(
06282       'featureloc_id' => array(
06283         'description' => 'TODO: please describe this field!',
06284         'type' => 'serial',
06285         'not null' => TRUE,
06286       ),
06287       'feature_id' => array(
06288         'description' => 'TODO: please describe this field!',
06289         'type' => 'int',
06290         'not null' => TRUE,
06291       ),
06292       'srcfeature_id' => array(
06293         'description' => 'TODO: please describe this field!',
06294         'type' => 'int',
06295         'not null' => FALSE,
06296       ),
06297       'fmin' => array(
06298         'description' => 'TODO: please describe this field!',
06299         'type' => 'int',
06300         'not null' => FALSE,
06301       ),
06302       'is_fmin_partial' => array(
06303         'description' => 'TODO: please describe this field!',
06304         'type' => 'boolean',
06305         'not null' => TRUE,
06306         'default' => 'als',
06307       ),
06308       'fmax' => array(
06309         'description' => 'TODO: please describe this field!',
06310         'type' => 'int',
06311         'not null' => FALSE,
06312       ),
06313       'is_fmax_partial' => array(
06314         'description' => 'TODO: please describe this field!',
06315         'type' => 'boolean',
06316         'not null' => TRUE,
06317         'default' => 'als',
06318       ),
06319       'strand' => array(
06320         'description' => 'TODO: please describe this field!',
06321         'type' => 'int',
06322         'size' => 'small',
06323         'not null' => FALSE,
06324       ),
06325       'phase' => array(
06326         'description' => 'TODO: please describe this field!',
06327         'type' => 'int',
06328         'not null' => FALSE,
06329       ),
06330       'residue_info' => array(
06331         'description' => 'TODO: please describe this field!',
06332         'type' => 'text',
06333         'not null' => FALSE,
06334       ),
06335       'locgroup' => array(
06336         'description' => 'TODO: please describe this field!',
06337         'type' => 'int',
06338         'not null' => TRUE,
06339         'default' => 0,
06340       ),
06341       'rank' => array(
06342         'description' => 'TODO: please describe this field!',
06343         'type' => 'int',
06344         'not null' => TRUE,
06345         'default' => 0,
06346       ),
06347     ),
06348     'primary key' => array(
06349       0 => 'featureloc_id',
06350     ),
06351     'unique keys' => array(
06352       'featureloc_c1' => array(
06353         0 => 'feature_id',
06354         1 => 'locgroup',
06355         2 => 'rank',
06356       ),
06357     ),
06358     'indexes' => array(
06359       'binloc_boxrange' => array(
06360         0 => 'fmin',
06361       ),
06362       'binloc_boxrange_src' => array(
06363         0 => 'srcfeature_id',
06364         1 => 'fmin',
06365       ),
06366       'featureloc_idx1' => array(
06367         0 => 'feature_id',
06368       ),
06369       'featureloc_idx2' => array(
06370         0 => 'srcfeature_id',
06371       ),
06372       'featureloc_idx3' => array(
06373         0 => 'srcfeature_id',
06374         1 => 'fmin',
06375         2 => 'fmax',
06376       ),
06377     ),
06378     'foreign keys' => array(
06379       'feature' => array(
06380         'table' => 'feature',
06381         'columns' => array(
06382           'feature_id' => 'feature_id',
06383           'srcfeature_id' => 'feature_id',
06384         ),
06385       ),
06386     ),
06387     'referring_tables' => array(
06388       0 => 'featureloc_pub',
06389     ),
06390     'table' => 'featureloc',
06391   );
06392   return $description;
06393 }
06407 function tripal_core_chado_schema_v1_2_featureloc_pub() {
06408   $description =  array(
06409     'description' => 'TODO: please describe this table!',
06410     'fields' => array(
06411       'featureloc_pub_id' => array(
06412         'description' => 'TODO: please describe this field!',
06413         'type' => 'serial',
06414         'not null' => TRUE,
06415       ),
06416       'featureloc_id' => array(
06417         'description' => 'TODO: please describe this field!',
06418         'type' => 'int',
06419         'not null' => TRUE,
06420       ),
06421       'pub_id' => array(
06422         'description' => 'TODO: please describe this field!',
06423         'type' => 'int',
06424         'not null' => TRUE,
06425       ),
06426     ),
06427     'primary key' => array(
06428       0 => 'featureloc_pub_id',
06429     ),
06430     'unique keys' => array(
06431       'featureloc_pub_c1' => array(
06432         0 => 'featureloc_id',
06433         1 => 'pub_id',
06434       ),
06435     ),
06436     'indexes' => array(
06437       'featureloc_pub_idx1' => array(
06438         0 => 'featureloc_id',
06439       ),
06440       'featureloc_pub_idx2' => array(
06441         0 => 'pub_id',
06442       ),
06443     ),
06444     'foreign keys' => array(
06445       'featureloc' => array(
06446         'table' => 'featureloc',
06447         'columns' => array(
06448           'featureloc_id' => 'featureloc_id',
06449         ),
06450       ),
06451       'pub' => array(
06452         'table' => 'pub',
06453         'columns' => array(
06454           'pub_id' => 'pub_id',
06455         ),
06456       ),
06457     ),
06458     'table' => 'featureloc_pub',
06459     'referring_tables' => NULL,
06460   );
06461   return $description;
06462 }
06476 function tripal_core_chado_schema_v1_2_featuremap() {
06477   $description =  array(
06478     'description' => 'TODO: please describe this table!',
06479     'fields' => array(
06480       'featuremap_id' => array(
06481         'description' => 'TODO: please describe this field!',
06482         'type' => 'serial',
06483         'not null' => TRUE,
06484       ),
06485       'name' => array(
06486         'description' => 'TODO: please describe this field!',
06487         'type' => 'varchar',
06488         'length' => '255',
06489         'not null' => FALSE,
06490       ),
06491       'description' => array(
06492         'description' => 'TODO: please describe this field!',
06493         'type' => 'text',
06494         'not null' => FALSE,
06495       ),
06496       'unittype_id' => array(
06497         'description' => 'TODO: please describe this field!',
06498         'type' => 'int',
06499         'not null' => FALSE,
06500       ),
06501     ),
06502     'primary key' => array(
06503       0 => 'featuremap_id',
06504     ),
06505     'unique keys' => array(
06506       'featuremap_c1' => array(
06507         0 => 'name',
06508       ),
06509     ),
06510     'foreign keys' => array(
06511       'cvterm' => array(
06512         'table' => 'cvterm',
06513         'columns' => array(
06514           'unittype_id' => 'cvterm_id',
06515         ),
06516       ),
06517     ),
06518     'table' => 'featuremap',
06519     'referring_tables' => array(
06520       0 => 'featuremap_pub',
06521       1 => 'featurepos',
06522       2 => 'featurerange',
06523     ),
06524   );
06525   return $description;
06526 }
06540 function tripal_core_chado_schema_v1_2_featuremap_pub() {
06541   $description =  array(
06542     'description' => 'TODO: please describe this table!',
06543     'fields' => array(
06544       'featuremap_pub_id' => array(
06545         'description' => 'TODO: please describe this field!',
06546         'type' => 'serial',
06547         'not null' => TRUE,
06548       ),
06549       'featuremap_id' => array(
06550         'description' => 'TODO: please describe this field!',
06551         'type' => 'int',
06552         'not null' => TRUE,
06553       ),
06554       'pub_id' => array(
06555         'description' => 'TODO: please describe this field!',
06556         'type' => 'int',
06557         'not null' => TRUE,
06558       ),
06559     ),
06560     'primary key' => array(
06561       0 => 'featuremap_pub_id',
06562     ),
06563     'indexes' => array(
06564       'featuremap_pub_idx1' => array(
06565         0 => 'featuremap_id',
06566       ),
06567       'featuremap_pub_idx2' => array(
06568         0 => 'pub_id',
06569       ),
06570     ),
06571     'foreign keys' => array(
06572       'pub' => array(
06573         'table' => 'pub',
06574         'columns' => array(
06575           'pub_id' => 'pub_id',
06576         ),
06577       ),
06578       'featuremap' => array(
06579         'table' => 'featuremap',
06580         'columns' => array(
06581           'featuremap_id' => 'featuremap_id',
06582         ),
06583       ),
06584     ),
06585     'table' => 'featuremap_pub',
06586     'referring_tables' => NULL,
06587   );
06588   return $description;
06589 }
06603 function tripal_core_chado_schema_v1_2_featurepos() {
06604   $description =  array(
06605     'description' => 'TODO: please describe this table!',
06606     'fields' => array(
06607       'featurepos_id' => array(
06608         'description' => 'TODO: please describe this field!',
06609         'type' => 'serial',
06610         'not null' => TRUE,
06611       ),
06612       'featuremap_id' => array(
06613         'description' => 'TODO: please describe this field!',
06614         'type' => 'serial',
06615         'not null' => TRUE,
06616       ),
06617       'feature_id' => array(
06618         'description' => 'TODO: please describe this field!',
06619         'type' => 'int',
06620         'not null' => TRUE,
06621       ),
06622       'map_feature_id' => array(
06623         'description' => 'TODO: please describe this field!',
06624         'type' => 'int',
06625         'not null' => TRUE,
06626       ),
06627       'mappos' => array(
06628         'description' => 'TODO: please describe this field!',
06629         'type' => 'float',
06630         'size' => 'big',
06631         'not null' => TRUE,
06632       ),
06633     ),
06634     'primary key' => array(
06635       0 => 'featurepos_id',
06636     ),
06637     'indexes' => array(
06638       'featurepos_idx1' => array(
06639         0 => 'featuremap_id',
06640       ),
06641       'featurepos_idx2' => array(
06642         0 => 'feature_id',
06643       ),
06644       'featurepos_idx3' => array(
06645         0 => 'map_feature_id',
06646       ),
06647     ),
06648     'foreign keys' => array(
06649       'feature' => array(
06650         'table' => 'feature',
06651         'columns' => array(
06652           'feature_id' => 'feature_id',
06653           'map_feature_id' => 'feature_id',
06654         ),
06655       ),
06656       'featuremap' => array(
06657         'table' => 'featuremap',
06658         'columns' => array(
06659           'featuremap_id' => 'featuremap_id',
06660         ),
06661       ),
06662     ),
06663     'table' => 'featurepos',
06664     'referring_tables' => NULL,
06665   );
06666   return $description;
06667 }
06681 function tripal_core_chado_schema_v1_2_featureprop() {
06682   $description =  array(
06683     'description' => 'TODO: please describe this table!',
06684     'fields' => array(
06685       'featureprop_id' => array(
06686         'description' => 'TODO: please describe this field!',
06687         'type' => 'serial',
06688         'not null' => TRUE,
06689       ),
06690       'feature_id' => array(
06691         'description' => 'TODO: please describe this field!',
06692         'type' => 'int',
06693         'not null' => TRUE,
06694       ),
06695       'type_id' => array(
06696         'description' => 'TODO: please describe this field!',
06697         'type' => 'int',
06698         'not null' => TRUE,
06699       ),
06700       'value' => array(
06701         'description' => 'TODO: please describe this field!',
06702         'type' => 'text',
06703         'not null' => FALSE,
06704       ),
06705       'rank' => array(
06706         'description' => 'TODO: please describe this field!',
06707         'type' => 'int',
06708         'not null' => TRUE,
06709         'default' => 0,
06710       ),
06711     ),
06712     'primary key' => array(
06713       0 => 'featureprop_id',
06714     ),
06715     'unique keys' => array(
06716       'featureprop_c1' => array(
06717         0 => 'feature_id',
06718         1 => 'type_id',
06719         2 => 'rank',
06720       ),
06721     ),
06722     'indexes' => array(
06723       'featureprop_idx1' => array(
06724         0 => 'feature_id',
06725       ),
06726       'featureprop_idx2' => array(
06727         0 => 'type_id',
06728       ),
06729     ),
06730     'foreign keys' => array(
06731       'cvterm' => array(
06732         'table' => 'cvterm',
06733         'columns' => array(
06734           'type_id' => 'cvterm_id',
06735         ),
06736       ),
06737       'feature' => array(
06738         'table' => 'feature',
06739         'columns' => array(
06740           'feature_id' => 'feature_id',
06741         ),
06742       ),
06743     ),
06744     'table' => 'featureprop',
06745     'referring_tables' => array(
06746       0 => 'featureprop_pub',
06747     ),
06748   );
06749   return $description;
06750 }
06764 function tripal_core_chado_schema_v1_2_featureprop_pub() {
06765   $description =  array(
06766     'description' => 'TODO: please describe this table!',
06767     'fields' => array(
06768       'featureprop_pub_id' => array(
06769         'description' => 'TODO: please describe this field!',
06770         'type' => 'serial',
06771         'not null' => TRUE,
06772       ),
06773       'featureprop_id' => array(
06774         'description' => 'TODO: please describe this field!',
06775         'type' => 'int',
06776         'not null' => TRUE,
06777       ),
06778       'pub_id' => array(
06779         'description' => 'TODO: please describe this field!',
06780         'type' => 'int',
06781         'not null' => TRUE,
06782       ),
06783     ),
06784     'primary key' => array(
06785       0 => 'featureprop_pub_id',
06786     ),
06787     'unique keys' => array(
06788       'featureprop_pub_c1' => array(
06789         0 => 'featureprop_id',
06790         1 => 'pub_id',
06791       ),
06792     ),
06793     'indexes' => array(
06794       'featureprop_pub_idx1' => array(
06795         0 => 'featureprop_id',
06796       ),
06797       'featureprop_pub_idx2' => array(
06798         0 => 'pub_id',
06799       ),
06800     ),
06801     'foreign keys' => array(
06802       'featureprop' => array(
06803         'table' => 'featureprop',
06804         'columns' => array(
06805           'featureprop_id' => 'featureprop_id',
06806         ),
06807       ),
06808       'pub' => array(
06809         'table' => 'pub',
06810         'columns' => array(
06811           'pub_id' => 'pub_id',
06812         ),
06813       ),
06814     ),
06815     'table' => 'featureprop_pub',
06816     'referring_tables' => NULL,
06817   );
06818   return $description;
06819 }
06833 function tripal_core_chado_schema_v1_2_featurerange() {
06834   $description =  array(
06835     'description' => 'TODO: please describe this table!',
06836     'fields' => array(
06837       'featurerange_id' => array(
06838         'description' => 'TODO: please describe this field!',
06839         'type' => 'serial',
06840         'not null' => TRUE,
06841       ),
06842       'featuremap_id' => array(
06843         'description' => 'TODO: please describe this field!',
06844         'type' => 'int',
06845         'not null' => TRUE,
06846       ),
06847       'feature_id' => array(
06848         'description' => 'TODO: please describe this field!',
06849         'type' => 'int',
06850         'not null' => TRUE,
06851       ),
06852       'leftstartf_id' => array(
06853         'description' => 'TODO: please describe this field!',
06854         'type' => 'int',
06855         'not null' => TRUE,
06856       ),
06857       'leftendf_id' => array(
06858         'description' => 'TODO: please describe this field!',
06859         'type' => 'int',
06860         'not null' => FALSE,
06861       ),
06862       'rightstartf_id' => array(
06863         'description' => 'TODO: please describe this field!',
06864         'type' => 'int',
06865         'not null' => FALSE,
06866       ),
06867       'rightendf_id' => array(
06868         'description' => 'TODO: please describe this field!',
06869         'type' => 'int',
06870         'not null' => TRUE,
06871       ),
06872       'rangestr' => array(
06873         'description' => 'TODO: please describe this field!',
06874         'type' => 'varchar',
06875         'length' => '255',
06876         'not null' => FALSE,
06877       ),
06878     ),
06879     'primary key' => array(
06880       0 => 'featurerange_id',
06881     ),
06882     'indexes' => array(
06883       'featurerange_idx1' => array(
06884         0 => 'featuremap_id',
06885       ),
06886       'featurerange_idx2' => array(
06887         0 => 'feature_id',
06888       ),
06889       'featurerange_idx3' => array(
06890         0 => 'leftstartf_id',
06891       ),
06892       'featurerange_idx4' => array(
06893         0 => 'leftendf_id',
06894       ),
06895       'featurerange_idx5' => array(
06896         0 => 'rightstartf_id',
06897       ),
06898       'featurerange_idx6' => array(
06899         0 => 'rightendf_id',
06900       ),
06901     ),
06902     'foreign keys' => array(
06903       'feature' => array(
06904         'table' => 'feature',
06905         'columns' => array(
06906           'feature_id' => 'feature_id',
06907           'leftstartf_id' => 'feature_id',
06908           'leftendf_id' => 'feature_id',
06909           'rightstartf_id' => 'feature_id',
06910           'rightendf_id' => 'feature_id',
06911         ),
06912       ),
06913       'featuremap' => array(
06914         'table' => 'featuremap',
06915         'columns' => array(
06916           'featuremap_id' => 'featuremap_id',
06917         ),
06918       ),
06919     ),
06920     'table' => 'featurerange',
06921     'referring_tables' => NULL,
06922   );
06923   return $description;
06924 }
06938 function tripal_core_chado_schema_v1_2_genotype() {
06939   $description =  array(
06940     'description' => 'TODO: please describe this table!',
06941     'fields' => array(
06942       'genotype_id' => array(
06943         'description' => 'TODO: please describe this field!',
06944         'type' => 'serial',
06945         'not null' => TRUE,
06946       ),
06947       'name' => array(
06948         'description' => 'TODO: please describe this field!',
06949         'type' => 'text',
06950         'not null' => FALSE,
06951       ),
06952       'uniquename' => array(
06953         'description' => 'TODO: please describe this field!',
06954         'type' => 'text',
06955         'not null' => TRUE,
06956       ),
06957       'description' => array(
06958         'description' => 'TODO: please describe this field!',
06959         'type' => 'varchar',
06960         'length' => '255',
06961         'not null' => FALSE,
06962       ),
06963       'type_id' => array(
06964         'description' => 'TODO: please describe this field!',
06965         'type' => 'int',
06966         'not null' => TRUE,
06967       ),
06968     ),
06969     'primary key' => array(
06970       0 => 'genotype_id',
06971     ),
06972     'unique keys' => array(
06973       'genotype_c1' => array(
06974         0 => 'uniquename',
06975       ),
06976     ),
06977     'indexes' => array(
06978       'genotype_idx1' => array(
06979         0 => 'uniquename',
06980       ),
06981       'genotype_idx2' => array(
06982         0 => 'name',
06983       ),
06984     ),
06985     'foreign keys' => array(
06986       'cvterm' => array(
06987         'table' => 'cvterm',
06988         'columns' => array(
06989           'type_id' => 'cvterm_id',
06990         ),
06991       ),
06992     ),
06993     'table' => 'genotype',
06994     'referring_tables' => array(
06995       0 => 'feature_genotype',
06996       1 => 'genotypeprop',
06997       9 => 'nd_experiment_genotype',
06998       10 => 'phendesc',
06999       11 => 'phenotype_comparison',
07000       13 => 'phenstatement',
07001       14 => 'stock_genotype',
07002     ),
07003   );
07004   return $description;
07005 }
07019 function tripal_core_chado_schema_v1_2_genotypeprop() {
07020   $description =  array(
07021     'description' => 'TODO: please describe this table!',
07022     'fields' => array(
07023       'genotypeprop_id' => array(
07024         'description' => 'TODO: please describe this field!',
07025         'type' => 'serial',
07026         'not null' => TRUE,
07027       ),
07028       'genotype_id' => array(
07029         'description' => 'TODO: please describe this field!',
07030         'type' => 'int',
07031         'not null' => TRUE,
07032       ),
07033       'type_id' => array(
07034         'description' => 'TODO: please describe this field!',
07035         'type' => 'int',
07036         'not null' => TRUE,
07037       ),
07038       'value' => array(
07039         'description' => 'TODO: please describe this field!',
07040         'type' => 'text',
07041         'not null' => FALSE,
07042       ),
07043       'rank' => array(
07044         'description' => 'TODO: please describe this field!',
07045         'type' => 'int',
07046         'not null' => TRUE,
07047         'default' => 0,
07048       ),
07049     ),
07050     'primary key' => array(
07051       0 => 'genotypeprop_id',
07052     ),
07053     'unique keys' => array(
07054       'genotypeprop_c1' => array(
07055         0 => 'genotype_id',
07056         1 => 'type_id',
07057         2 => 'rank',
07058       ),
07059     ),
07060     'indexes' => array(
07061       'genotypeprop_idx1' => array(
07062         0 => 'genotype_id',
07063       ),
07064       'genotypeprop_idx2' => array(
07065         0 => 'type_id',
07066       ),
07067     ),
07068     'foreign keys' => array(
07069       'cvterm' => array(
07070         'table' => 'cvterm',
07071         'columns' => array(
07072           'type_id' => 'cvterm_id',
07073         ),
07074       ),
07075       'genotype' => array(
07076         'table' => 'genotype',
07077         'columns' => array(
07078           'genotype_id' => 'genotype_id',
07079         ),
07080       ),
07081     ),
07082     'table' => 'genotypeprop',
07083     'referring_tables' => NULL,
07084   );
07085   return $description;
07086 }
07100 function tripal_core_chado_schema_v1_2_library() {
07101   $description =  array(
07102     'description' => 'TODO: please describe this table!',
07103     'fields' => array(
07104       'library_id' => array(
07105         'description' => 'TODO: please describe this field!',
07106         'type' => 'serial',
07107         'not null' => TRUE,
07108       ),
07109       'organism_id' => array(
07110         'description' => 'TODO: please describe this field!',
07111         'type' => 'int',
07112         'not null' => TRUE,
07113       ),
07114       'name' => array(
07115         'description' => 'TODO: please describe this field!',
07116         'type' => 'varchar',
07117         'length' => '255',
07118         'not null' => FALSE,
07119       ),
07120       'uniquename' => array(
07121         'description' => 'TODO: please describe this field!',
07122         'type' => 'text',
07123         'not null' => TRUE,
07124       ),
07125       'type_id' => array(
07126         'description' => 'TODO: please describe this field!',
07127         'type' => 'int',
07128         'not null' => TRUE,
07129       ),
07130       'is_obsolete' => array(
07131         'description' => 'TODO: please describe this field!',
07132         'type' => 'int',
07133         'not null' => TRUE,
07134         'default' => 0,
07135       ),
07136       'timeaccessioned' => array(
07137         'description' => 'TODO: please describe this field!',
07138         'type' => 'datetime',
07139         'not null' => TRUE,
07140         'default' => 'ow(',
07141       ),
07142       'timelastmodified' => array(
07143         'description' => 'TODO: please describe this field!',
07144         'type' => 'datetime',
07145         'not null' => TRUE,
07146         'default' => 'ow(',
07147       ),
07148     ),
07149     'primary key' => array(
07150       0 => 'library_id',
07151     ),
07152     'unique keys' => array(
07153       'library_c1' => array(
07154         0 => 'organism_id',
07155         1 => 'uniquename',
07156         2 => 'type_id',
07157       ),
07158     ),
07159     'indexes' => array(
07160       'library_idx1' => array(
07161         0 => 'organism_id',
07162       ),
07163       'library_idx2' => array(
07164         0 => 'type_id',
07165       ),
07166       'library_idx3' => array(
07167         0 => 'uniquename',
07168       ),
07169       'library_name_ind1' => array(
07170         0 => 'name',
07171       ),
07172     ),
07173     'foreign keys' => array(
07174       'organism' => array(
07175         'table' => 'organism',
07176         'columns' => array(
07177           'organism_id' => 'organism_id',
07178         ),
07179       ),
07180       'cvterm' => array(
07181         'table' => 'cvterm',
07182         'columns' => array(
07183           'type_id' => 'cvterm_id',
07184         ),
07185       ),
07186     ),
07187     'referring_tables' => array(
07188       0 => 'cell_line_library',
07189       1 => 'library_cvterm',
07190       2 => 'library_dbxref',
07191       3 => 'library_feature',
07192       4 => 'library_pub',
07193       5 => 'library_synonym',
07194       6 => 'libraryprop',
07195     ),
07196     'table' => 'library',
07197   );
07198   return $description;
07199 }
07200 
07214 function tripal_core_chado_schema_v1_2_library_cvterm() {
07215   $description =  array(
07216     'description' => 'TODO: please describe this table!',
07217     'fields' => array(
07218       'library_cvterm_id' => array(
07219         'description' => 'TODO: please describe this field!',
07220         'type' => 'serial',
07221         'not null' => TRUE,
07222       ),
07223       'library_id' => array(
07224         'description' => 'TODO: please describe this field!',
07225         'type' => 'int',
07226         'not null' => TRUE,
07227       ),
07228       'cvterm_id' => array(
07229         'description' => 'TODO: please describe this field!',
07230         'type' => 'int',
07231         'not null' => TRUE,
07232       ),
07233       'pub_id' => array(
07234         'description' => 'TODO: please describe this field!',
07235         'type' => 'int',
07236         'not null' => TRUE,
07237       ),
07238     ),
07239     'primary key' => array(
07240       0 => 'library_cvterm_id',
07241     ),
07242     'unique keys' => array(
07243       'library_cvterm_c1' => array(
07244         0 => 'library_id',
07245         1 => 'cvterm_id',
07246         2 => 'pub_id',
07247       ),
07248     ),
07249     'indexes' => array(
07250       'library_cvterm_idx1' => array(
07251         0 => 'library_id',
07252       ),
07253       'library_cvterm_idx2' => array(
07254         0 => 'cvterm_id',
07255       ),
07256       'library_cvterm_idx3' => array(
07257         0 => 'pub_id',
07258       ),
07259     ),
07260     'foreign keys' => array(
07261       'cvterm' => array(
07262         'table' => 'cvterm',
07263         'columns' => array(
07264           'cvterm_id' => 'cvterm_id',
07265         ),
07266       ),
07267       'pub' => array(
07268         'table' => 'pub',
07269         'columns' => array(
07270           'pub_id' => 'pub_id',
07271         ),
07272       ),
07273       'library' => array(
07274         'table' => 'library',
07275         'columns' => array(
07276           'library_id' => 'library_id',
07277         ),
07278       ),
07279     ),
07280     'table' => 'library_cvterm',
07281     'referring_tables' => NULL,
07282   );
07283   return $description;
07284 }
07298 function tripal_core_chado_schema_v1_2_library_dbxref() {
07299   $description =  array(
07300     'description' => 'TODO: please describe this table!',
07301     'fields' => array(
07302       'library_dbxref_id' => array(
07303         'description' => 'TODO: please describe this field!',
07304         'type' => 'serial',
07305         'not null' => TRUE,
07306       ),
07307       'library_id' => array(
07308         'description' => 'TODO: please describe this field!',
07309         'type' => 'int',
07310         'not null' => TRUE,
07311       ),
07312       'dbxref_id' => array(
07313         'description' => 'TODO: please describe this field!',
07314         'type' => 'int',
07315         'not null' => TRUE,
07316       ),
07317       'is_current' => array(
07318         'description' => 'TODO: please describe this field!',
07319         'type' => 'boolean',
07320         'not null' => TRUE,
07321         'default' => 'ru',
07322       ),
07323     ),
07324     'primary key' => array(
07325       0 => 'library_dbxref_id',
07326     ),
07327     'unique keys' => array(
07328       'library_dbxref_c1' => array(
07329         0 => 'library_id',
07330         1 => 'dbxref_id',
07331       ),
07332     ),
07333     'indexes' => array(
07334       'library_dbxref_idx1' => array(
07335         0 => 'library_id',
07336       ),
07337       'library_dbxref_idx2' => array(
07338         0 => 'dbxref_id',
07339       ),
07340     ),
07341     'foreign keys' => array(
07342       'dbxref' => array(
07343         'table' => 'dbxref',
07344         'columns' => array(
07345           'dbxref_id' => 'dbxref_id',
07346         ),
07347       ),
07348       'library' => array(
07349         'table' => 'library',
07350         'columns' => array(
07351           'library_id' => 'library_id',
07352         ),
07353       ),
07354     ),
07355     'table' => 'library_dbxref',
07356     'referring_tables' => NULL,
07357   );
07358   return $description;
07359 }
07373 function tripal_core_chado_schema_v1_2_library_feature() {
07374   $description =  array(
07375     'description' => 'TODO: please describe this table!',
07376     'fields' => array(
07377       'library_feature_id' => array(
07378         'description' => 'TODO: please describe this field!',
07379         'type' => 'serial',
07380         'not null' => TRUE,
07381       ),
07382       'library_id' => array(
07383         'description' => 'TODO: please describe this field!',
07384         'type' => 'int',
07385         'not null' => TRUE,
07386       ),
07387       'feature_id' => array(
07388         'description' => 'TODO: please describe this field!',
07389         'type' => 'int',
07390         'not null' => TRUE,
07391       ),
07392     ),
07393     'primary key' => array(
07394       0 => 'library_feature_id',
07395     ),
07396     'unique keys' => array(
07397       'library_feature_c1' => array(
07398         0 => 'library_id',
07399         1 => 'feature_id',
07400       ),
07401     ),
07402     'indexes' => array(
07403       'library_feature_idx1' => array(
07404         0 => 'library_id',
07405       ),
07406       'library_feature_idx2' => array(
07407         0 => 'feature_id',
07408       ),
07409     ),
07410     'foreign keys' => array(
07411       'feature' => array(
07412         'table' => 'feature',
07413         'columns' => array(
07414           'feature_id' => 'feature_id',
07415         ),
07416       ),
07417       'library' => array(
07418         'table' => 'library',
07419         'columns' => array(
07420           'library_id' => 'library_id',
07421         ),
07422       ),
07423     ),
07424     'table' => 'library_feature',
07425     'referring_tables' => NULL,
07426   );
07427   return $description;
07428 }
07442 function tripal_core_chado_schema_v1_2_library_pub() {
07443   $description =  array(
07444     'description' => 'TODO: please describe this table!',
07445     'fields' => array(
07446       'library_pub_id' => array(
07447         'description' => 'TODO: please describe this field!',
07448         'type' => 'serial',
07449         'not null' => TRUE,
07450       ),
07451       'library_id' => array(
07452         'description' => 'TODO: please describe this field!',
07453         'type' => 'int',
07454         'not null' => TRUE,
07455       ),
07456       'pub_id' => array(
07457         'description' => 'TODO: please describe this field!',
07458         'type' => 'int',
07459         'not null' => TRUE,
07460       ),
07461     ),
07462     'primary key' => array(
07463       0 => 'library_pub_id',
07464     ),
07465     'unique keys' => array(
07466       'library_pub_c1' => array(
07467         0 => 'library_id',
07468         1 => 'pub_id',
07469       ),
07470     ),
07471     'indexes' => array(
07472       'library_pub_idx1' => array(
07473         0 => 'library_id',
07474       ),
07475       'library_pub_idx2' => array(
07476         0 => 'pub_id',
07477       ),
07478     ),
07479     'foreign keys' => array(
07480       'pub' => array(
07481         'table' => 'pub',
07482         'columns' => array(
07483           'pub_id' => 'pub_id',
07484         ),
07485       ),
07486       'library' => array(
07487         'table' => 'library',
07488         'columns' => array(
07489           'library_id' => 'library_id',
07490         ),
07491       ),
07492     ),
07493     'table' => 'library_pub',
07494     'referring_tables' => NULL,
07495   );
07496   return $description;
07497 }
07498 
07512 function tripal_core_chado_schema_v1_2_library_synonym() {
07513   $description =  array(
07514     'description' => 'TODO: please describe this table!',
07515     'fields' => array(
07516       'library_synonym_id' => array(
07517         'description' => 'TODO: please describe this field!',
07518         'type' => 'serial',
07519         'not null' => TRUE,
07520       ),
07521       'synonym_id' => array(
07522         'description' => 'TODO: please describe this field!',
07523         'type' => 'int',
07524         'not null' => TRUE,
07525       ),
07526       'library_id' => array(
07527         'description' => 'TODO: please describe this field!',
07528         'type' => 'int',
07529         'not null' => TRUE,
07530       ),
07531       'pub_id' => array(
07532         'description' => 'TODO: please describe this field!',
07533         'type' => 'int',
07534         'not null' => TRUE,
07535       ),
07536       'is_current' => array(
07537         'description' => 'TODO: please describe this field!',
07538         'type' => 'boolean',
07539         'not null' => TRUE,
07540         'default' => 'ru',
07541       ),
07542       'is_internal' => array(
07543         'description' => 'TODO: please describe this field!',
07544         'type' => 'boolean',
07545         'not null' => TRUE,
07546         'default' => 'als',
07547       ),
07548     ),
07549     'primary key' => array(
07550       0 => 'library_synonym_id',
07551     ),
07552     'unique keys' => array(
07553       'library_synonym_c1' => array(
07554         0 => 'synonym_id',
07555         1 => 'library_id',
07556         2 => 'pub_id',
07557       ),
07558     ),
07559     'indexes' => array(
07560       'library_synonym_idx1' => array(
07561         0 => 'synonym_id',
07562       ),
07563       'library_synonym_idx2' => array(
07564         0 => 'library_id',
07565       ),
07566       'library_synonym_idx3' => array(
07567         0 => 'pub_id',
07568       ),
07569     ),
07570     'foreign keys' => array(
07571       'pub' => array(
07572         'table' => 'pub',
07573         'columns' => array(
07574           'pub_id' => 'pub_id',
07575         ),
07576       ),
07577       'synonym' => array(
07578         'table' => 'synonym',
07579         'columns' => array(
07580           'synonym_id' => 'synonym_id',
07581         ),
07582       ),
07583       'library' => array(
07584         'table' => 'library',
07585         'columns' => array(
07586           'library_id' => 'library_id',
07587         ),
07588       ),
07589     ),
07590     'table' => 'library_synonym',
07591     'referring_tables' => NULL,
07592   );
07593   return $description;
07594 }
07608 function tripal_core_chado_schema_v1_2_libraryprop() {
07609   $description =  array(
07610     'description' => 'TODO: please describe this table!',
07611     'fields' => array(
07612       'libraryprop_id' => array(
07613         'description' => 'TODO: please describe this field!',
07614         'type' => 'serial',
07615         'not null' => TRUE,
07616       ),
07617       'library_id' => array(
07618         'description' => 'TODO: please describe this field!',
07619         'type' => 'int',
07620         'not null' => TRUE,
07621       ),
07622       'type_id' => array(
07623         'description' => 'TODO: please describe this field!',
07624         'type' => 'int',
07625         'not null' => TRUE,
07626       ),
07627       'value' => array(
07628         'description' => 'TODO: please describe this field!',
07629         'type' => 'text',
07630         'not null' => FALSE,
07631       ),
07632       'rank' => array(
07633         'description' => 'TODO: please describe this field!',
07634         'type' => 'int',
07635         'not null' => TRUE,
07636         'default' => 0,
07637       ),
07638     ),
07639     'primary key' => array(
07640       0 => 'libraryprop_id',
07641     ),
07642     'unique keys' => array(
07643       'libraryprop_c1' => array(
07644         0 => 'library_id',
07645         1 => 'type_id',
07646         2 => 'rank',
07647       ),
07648     ),
07649     'indexes' => array(
07650       'libraryprop_idx1' => array(
07651         0 => 'library_id',
07652       ),
07653       'libraryprop_idx2' => array(
07654         0 => 'type_id',
07655       ),
07656     ),
07657     'foreign keys' => array(
07658       'cvterm' => array(
07659         'table' => 'cvterm',
07660         'columns' => array(
07661           'type_id' => 'cvterm_id',
07662         ),
07663       ),
07664       'library' => array(
07665         'table' => 'library',
07666         'columns' => array(
07667           'library_id' => 'library_id',
07668         ),
07669       ),
07670     ),
07671     'table' => 'libraryprop',
07672     'referring_tables' => array(
07673       0 => 'libraryprop_pub',
07674     ),
07675   );
07676   return $description;
07677 }
07691 function tripal_core_chado_schema_v1_2_libraryprop_pub() {
07692   $description =  array(
07693     'description' => 'TODO: please describe this table!',
07694     'fields' => array(
07695       'libraryprop_pub_id' => array(
07696         'description' => 'TODO: please describe this field!',
07697         'type' => 'serial',
07698         'not null' => TRUE,
07699       ),
07700       'libraryprop_id' => array(
07701         'description' => 'TODO: please describe this field!',
07702         'type' => 'int',
07703         'not null' => TRUE,
07704       ),
07705       'pub_id' => array(
07706         'description' => 'TODO: please describe this field!',
07707         'type' => 'int',
07708         'not null' => TRUE,
07709       ),
07710     ),
07711     'primary key' => array(
07712       0 => 'libraryprop_pub_id',
07713     ),
07714     'unique keys' => array(
07715       'libraryprop_pub_c1' => array(
07716         0 => 'libraryprop_id',
07717         1 => 'pub_id',
07718       ),
07719     ),
07720     'indexes' => array(
07721       'libraryprop_pub_idx1' => array(
07722         0 => 'libraryprop_id',
07723       ),
07724       'libraryprop_pub_idx2' => array(
07725         0 => 'pub_id',
07726       ),
07727     ),
07728     'foreign keys' => array(
07729       'pub' => array(
07730         'table' => 'pub',
07731         'columns' => array(
07732           'pub_id' => 'pub_id',
07733         ),
07734       ),
07735       'libraryprop' => array(
07736         'table' => 'libraryprop',
07737         'columns' => array(
07738           'libraryprop_id' => 'libraryprop_id',
07739         ),
07740       ),
07741     ),
07742     'table' => 'libraryprop_pub',
07743     'referring_tables' => NULL,
07744   );
07745   return $description;
07746 }
07760 function tripal_core_chado_schema_v1_2_magedocumentation() {
07761   $description =  array(
07762     'description' => 'TODO: please describe this table!',
07763     'fields' => array(
07764       'magedocumentation_id' => array(
07765         'description' => 'TODO: please describe this field!',
07766         'type' => 'serial',
07767         'not null' => TRUE,
07768       ),
07769       'mageml_id' => array(
07770         'description' => 'TODO: please describe this field!',
07771         'type' => 'int',
07772         'not null' => TRUE,
07773       ),
07774       'tableinfo_id' => array(
07775         'description' => 'TODO: please describe this field!',
07776         'type' => 'int',
07777         'not null' => TRUE,
07778       ),
07779       'row_id' => array(
07780         'description' => 'TODO: please describe this field!',
07781         'type' => 'int',
07782         'not null' => TRUE,
07783       ),
07784       'mageidentifier' => array(
07785         'description' => 'TODO: please describe this field!',
07786         'type' => 'text',
07787         'not null' => TRUE,
07788       ),
07789     ),
07790     'primary key' => array(
07791       0 => 'magedocumentation_id',
07792     ),
07793     'indexes' => array(
07794       'magedocumentation_idx1' => array(
07795         0 => 'mageml_id',
07796       ),
07797       'magedocumentation_idx2' => array(
07798         0 => 'tableinfo_id',
07799       ),
07800       'magedocumentation_idx3' => array(
07801         0 => 'row_id',
07802       ),
07803     ),
07804     'foreign keys' => array(
07805       'tableinfo' => array(
07806         'table' => 'tableinfo',
07807         'columns' => array(
07808           'tableinfo_id' => 'tableinfo_id',
07809         ),
07810       ),
07811       'mageml' => array(
07812         'table' => 'mageml',
07813         'columns' => array(
07814           'mageml_id' => 'mageml_id',
07815         ),
07816       ),
07817     ),
07818     'table' => 'magedocumentation',
07819     'referring_tables' => NULL,
07820   );
07821   return $description;
07822 }
07836 function tripal_core_chado_schema_v1_2_mageml() {
07837   $description =  array(
07838     'description' => 'TODO: please describe this table!',
07839     'fields' => array(
07840       'mageml_id' => array(
07841         'description' => 'TODO: please describe this field!',
07842         'type' => 'serial',
07843         'not null' => TRUE,
07844       ),
07845       'mage_package' => array(
07846         'description' => 'TODO: please describe this field!',
07847         'type' => 'text',
07848         'not null' => TRUE,
07849       ),
07850       'mage_ml' => array(
07851         'description' => 'TODO: please describe this field!',
07852         'type' => 'text',
07853         'not null' => TRUE,
07854       ),
07855     ),
07856     'primary key' => array(
07857       0 => 'mageml_id',
07858     ),
07859     'foreign keys' => array(
07860     ),
07861     'table' => 'mageml',
07862     'referring_tables' => array(
07863       0 => 'magedocumentation',
07864     ),
07865   );
07866   return $description;
07867 }
07881 function tripal_core_chado_schema_v1_2_nd_experiment() {
07882   $description =  array(
07883     'description' => 'TODO: please describe this table!',
07884     'fields' => array(
07885       'nd_experiment_id' => array(
07886         'description' => 'TODO: please describe this field!',
07887         'type' => 'serial',
07888         'not null' => TRUE,
07889       ),
07890       'nd_geolocation_id' => array(
07891         'description' => 'TODO: please describe this field!',
07892         'type' => 'int',
07893         'not null' => TRUE,
07894       ),
07895       'type_id' => array(
07896         'description' => 'TODO: please describe this field!',
07897         'type' => 'int',
07898         'not null' => TRUE,
07899       ),
07900     ),
07901     'primary key' => array(
07902       0 => 'nd_experiment_id',
07903     ),
07904     'foreign keys' => array(
07905       'cvterm' => array(
07906         'table' => 'cvterm',
07907         'columns' => array(
07908           'type_id' => 'cvterm_id',
07909         ),
07910       ),
07911       'nd_geolocation' => array(
07912         'table' => 'nd_geolocation',
07913         'columns' => array(
07914           'nd_geolocation_id' => 'nd_geolocation_id',
07915         ),
07916       ),
07917     ),
07918     'table' => 'nd_experiment',
07919     'referring_tables' => array(
07920       0 => 'nd_experiment_contact',
07921       1 => 'nd_experiment_dbxref',
07922       2 => 'nd_experiment_genotype',
07923       3 => 'nd_experiment_phenotype',
07924       4 => 'nd_experiment_project',
07925       5 => 'nd_experiment_protocol',
07926       6 => 'nd_experiment_pub',
07927       7 => 'nd_experiment_stock',
07928       8 => 'nd_experimentprop',
07929     ),
07930   );
07931   return $description;
07932 }
07946 function tripal_core_chado_schema_v1_2_nd_experiment_contact() {
07947   $description =  array(
07948     'description' => 'TODO: please describe this table!',
07949     'fields' => array(
07950       'nd_experiment_contact_id' => array(
07951         'description' => 'TODO: please describe this field!',
07952         'type' => 'serial',
07953         'not null' => TRUE,
07954       ),
07955       'nd_experiment_id' => array(
07956         'description' => 'TODO: please describe this field!',
07957         'type' => 'int',
07958         'not null' => TRUE,
07959       ),
07960       'contact_id' => array(
07961         'description' => 'TODO: please describe this field!',
07962         'type' => 'int',
07963         'not null' => TRUE,
07964       ),
07965     ),
07966     'primary key' => array(
07967       0 => 'nd_experiment_contact_id',
07968     ),
07969     'foreign keys' => array(
07970       'contact' => array(
07971         'table' => 'contact',
07972         'columns' => array(
07973           'contact_id' => 'contact_id',
07974         ),
07975       ),
07976       'nd_experiment' => array(
07977         'table' => 'nd_experiment',
07978         'columns' => array(
07979           'nd_experiment_id' => 'nd_experiment_id',
07980         ),
07981       ),
07982     ),
07983     'table' => 'nd_experiment_contact',
07984     'referring_tables' => NULL,
07985   );
07986   return $description;
07987 }
08001 function tripal_core_chado_schema_v1_2_nd_experiment_dbxref() {
08002   $description =  array(
08003     'description' => 'TODO: please describe this table!',
08004     'fields' => array(
08005       'nd_experiment_dbxref_id' => array(
08006         'description' => 'TODO: please describe this field!',
08007         'type' => 'serial',
08008         'not null' => TRUE,
08009       ),
08010       'nd_experiment_id' => array(
08011         'description' => 'TODO: please describe this field!',
08012         'type' => 'int',
08013         'not null' => TRUE,
08014       ),
08015       'dbxref_id' => array(
08016         'description' => 'TODO: please describe this field!',
08017         'type' => 'int',
08018         'not null' => TRUE,
08019       ),
08020     ),
08021     'primary key' => array(
08022       0 => 'nd_experiment_dbxref_id',
08023     ),
08024     'foreign keys' => array(
08025       'dbxref' => array(
08026         'table' => 'dbxref',
08027         'columns' => array(
08028           'dbxref_id' => 'dbxref_id',
08029         ),
08030       ),
08031       'nd_experiment' => array(
08032         'table' => 'nd_experiment',
08033         'columns' => array(
08034           'nd_experiment_id' => 'nd_experiment_id',
08035         ),
08036       ),
08037     ),
08038     'table' => 'nd_experiment_dbxref',
08039     'referring_tables' => NULL,
08040   );
08041   return $description;
08042 }
08056 function tripal_core_chado_schema_v1_2_nd_experiment_genotype() {
08057   $description =  array(
08058     'description' => 'TODO: please describe this table!',
08059     'fields' => array(
08060       'nd_experiment_genotype_id' => array(
08061         'description' => 'TODO: please describe this field!',
08062         'type' => 'serial',
08063         'not null' => TRUE,
08064       ),
08065       'nd_experiment_id' => array(
08066         'description' => 'TODO: please describe this field!',
08067         'type' => 'int',
08068         'not null' => TRUE,
08069       ),
08070       'genotype_id' => array(
08071         'description' => 'TODO: please describe this field!',
08072         'type' => 'int',
08073         'not null' => TRUE,
08074       ),
08075     ),
08076     'primary key' => array(
08077       0 => 'nd_experiment_genotype_id',
08078     ),
08079     'unique keys' => array(
08080       'nd_experiment_genotype_c1' => array(
08081         0 => 'nd_experiment_id',
08082         1 => 'genotype_id',
08083       ),
08084     ),
08085     'foreign keys' => array(
08086       'genotype' => array(
08087         'table' => 'genotype',
08088         'columns' => array(
08089           'genotype_id' => 'genotype_id',
08090         ),
08091       ),
08092       'nd_experiment' => array(
08093         'table' => 'nd_experiment',
08094         'columns' => array(
08095           'nd_experiment_id' => 'nd_experiment_id',
08096         ),
08097       ),
08098     ),
08099     'table' => 'nd_experiment_genotype',
08100     'referring_tables' => NULL,
08101   );
08102   return $description;
08103 }
08117 function tripal_core_chado_schema_v1_2_nd_experiment_phenotype() {
08118   $description =  array(
08119     'description' => 'TODO: please describe this table!',
08120     'fields' => array(
08121       'nd_experiment_phenotype_id' => array(
08122         'description' => 'TODO: please describe this field!',
08123         'type' => 'serial',
08124         'not null' => TRUE,
08125       ),
08126       'nd_experiment_id' => array(
08127         'description' => 'TODO: please describe this field!',
08128         'type' => 'int',
08129         'not null' => TRUE,
08130       ),
08131       'phenotype_id' => array(
08132         'description' => 'TODO: please describe this field!',
08133         'type' => 'int',
08134         'not null' => TRUE,
08135       ),
08136     ),
08137     'primary key' => array(
08138       0 => 'nd_experiment_phenotype_id',
08139     ),
08140     'unique keys' => array(
08141       'nd_experiment_phenotype_c1' => array(
08142         0 => 'nd_experiment_id',
08143         1 => 'phenotype_id',
08144       ),
08145     ),
08146     'foreign keys' => array(
08147       'phenotype' => array(
08148         'table' => 'phenotype',
08149         'columns' => array(
08150           'phenotype_id' => 'phenotype_id',
08151         ),
08152       ),
08153       'nd_experiment' => array(
08154         'table' => 'nd_experiment',
08155         'columns' => array(
08156           'nd_experiment_id' => 'nd_experiment_id',
08157         ),
08158       ),
08159     ),
08160     'table' => 'nd_experiment_phenotype',
08161     'referring_tables' => NULL,
08162   );
08163   return $description;
08164 }
08178 function tripal_core_chado_schema_v1_2_nd_experiment_project() {
08179   $description =  array(
08180     'description' => 'TODO: please describe this table!',
08181     'fields' => array(
08182       'nd_experiment_project_id' => array(
08183         'description' => 'TODO: please describe this field!',
08184         'type' => 'serial',
08185         'not null' => TRUE,
08186       ),
08187       'project_id' => array(
08188         'description' => 'TODO: please describe this field!',
08189         'type' => 'int',
08190         'not null' => TRUE,
08191       ),
08192       'nd_experiment_id' => array(
08193         'description' => 'TODO: please describe this field!',
08194         'type' => 'int',
08195         'not null' => TRUE,
08196       ),
08197     ),
08198     'primary key' => array(
08199       0 => 'nd_experiment_project_id',
08200     ),
08201     'foreign keys' => array(
08202       'project' => array(
08203         'table' => 'project',
08204         'columns' => array(
08205           'project_id' => 'project_id',
08206         ),
08207       ),
08208       'nd_experiment' => array(
08209         'table' => 'nd_experiment',
08210         'columns' => array(
08211           'nd_experiment_id' => 'nd_experiment_id',
08212         ),
08213       ),
08214     ),
08215     'table' => 'nd_experiment_project',
08216     'referring_tables' => NULL,
08217   );
08218   return $description;
08219 }
08233 function tripal_core_chado_schema_v1_2_nd_experiment_protocol() {
08234   $description =  array(
08235     'description' => 'TODO: please describe this table!',
08236     'fields' => array(
08237       'nd_experiment_protocol_id' => array(
08238         'description' => 'TODO: please describe this field!',
08239         'type' => 'serial',
08240         'not null' => TRUE,
08241       ),
08242       'nd_experiment_id' => array(
08243         'description' => 'TODO: please describe this field!',
08244         'type' => 'int',
08245         'not null' => TRUE,
08246       ),
08247       'nd_protocol_id' => array(
08248         'description' => 'TODO: please describe this field!',
08249         'type' => 'int',
08250         'not null' => TRUE,
08251       ),
08252     ),
08253     'primary key' => array(
08254       0 => 'nd_experiment_protocol_id',
08255     ),
08256     'foreign keys' => array(
08257       'nd_experiment' => array(
08258         'table' => 'nd_experiment',
08259         'columns' => array(
08260           'nd_experiment_id' => 'nd_experiment_id',
08261         ),
08262       ),
08263       'nd_protocol' => array(
08264         'table' => 'nd_protocol',
08265         'columns' => array(
08266           'nd_protocol_id' => 'nd_protocol_id',
08267         ),
08268       ),
08269     ),
08270     'table' => 'nd_experiment_protocol',
08271     'referring_tables' => NULL,
08272   );
08273   return $description;
08274 }
08288 function tripal_core_chado_schema_v1_2_nd_experiment_pub() {
08289   $description =  array(
08290     'description' => 'TODO: please describe this table!',
08291     'fields' => array(
08292       'nd_experiment_pub_id' => array(
08293         'description' => 'TODO: please describe this field!',
08294         'type' => 'serial',
08295         'not null' => TRUE,
08296       ),
08297       'nd_experiment_id' => array(
08298         'description' => 'TODO: please describe this field!',
08299         'type' => 'int',
08300         'not null' => TRUE,
08301       ),
08302       'pub_id' => array(
08303         'description' => 'TODO: please describe this field!',
08304         'type' => 'int',
08305         'not null' => TRUE,
08306       ),
08307     ),
08308     'primary key' => array(
08309       0 => 'nd_experiment_pub_id',
08310     ),
08311     'unique keys' => array(
08312       'nd_experiment_pub_c1' => array(
08313         0 => 'nd_experiment_id',
08314         1 => 'pub_id',
08315       ),
08316     ),
08317     'indexes' => array(
08318       'nd_experiment_pub_idx1' => array(
08319         0 => 'nd_experiment_id',
08320       ),
08321       'nd_experiment_pub_idx2' => array(
08322         0 => 'pub_id',
08323       ),
08324     ),
08325     'foreign keys' => array(
08326       'pub' => array(
08327         'table' => 'pub',
08328         'columns' => array(
08329           'pub_id' => 'pub_id',
08330         ),
08331       ),
08332       'nd_experiment' => array(
08333         'table' => 'nd_experiment',
08334         'columns' => array(
08335           'nd_experiment_id' => 'nd_experiment_id',
08336         ),
08337       ),
08338     ),
08339     'table' => 'nd_experiment_pub',
08340     'referring_tables' => NULL,
08341   );
08342   return $description;
08343 }
08357 function tripal_core_chado_schema_v1_2_nd_experiment_stock() {
08358   $description =  array(
08359     'description' => 'TODO: please describe this table!',
08360     'fields' => array(
08361       'nd_experiment_stock_id' => array(
08362         'description' => 'TODO: please describe this field!',
08363         'type' => 'serial',
08364         'not null' => TRUE,
08365       ),
08366       'nd_experiment_id' => array(
08367         'description' => 'TODO: please describe this field!',
08368         'type' => 'int',
08369         'not null' => TRUE,
08370       ),
08371       'stock_id' => array(
08372         'description' => 'TODO: please describe this field!',
08373         'type' => 'int',
08374         'not null' => TRUE,
08375       ),
08376       'type_id' => array(
08377         'description' => 'TODO: please describe this field!',
08378         'type' => 'int',
08379         'not null' => TRUE,
08380       ),
08381     ),
08382     'primary key' => array(
08383       0 => 'nd_experiment_stock_id',
08384     ),
08385     'foreign keys' => array(
08386       'cvterm' => array(
08387         'table' => 'cvterm',
08388         'columns' => array(
08389           'type_id' => 'cvterm_id',
08390         ),
08391       ),
08392       'stock' => array(
08393         'table' => 'stock',
08394         'columns' => array(
08395           'stock_id' => 'stock_id',
08396         ),
08397       ),
08398       'nd_experiment' => array(
08399         'table' => 'nd_experiment',
08400         'columns' => array(
08401           'nd_experiment_id' => 'nd_experiment_id',
08402         ),
08403       ),
08404     ),
08405     'table' => 'nd_experiment_stock',
08406     'referring_tables' => array(
08407       0 => 'nd_experiment_stock_dbxref',
08408       1 => 'nd_experiment_stockprop',
08409     ),
08410   );
08411   return $description;
08412 }
08426 function tripal_core_chado_schema_v1_2_nd_experiment_stock_dbxref() {
08427   $description =  array(
08428     'description' => 'TODO: please describe this table!',
08429     'fields' => array(
08430       'nd_experiment_stock_dbxref_id' => array(
08431         'description' => 'TODO: please describe this field!',
08432         'type' => 'serial',
08433         'not null' => TRUE,
08434       ),
08435       'nd_experiment_stock_id' => array(
08436         'description' => 'TODO: please describe this field!',
08437         'type' => 'int',
08438         'not null' => TRUE,
08439       ),
08440       'dbxref_id' => array(
08441         'description' => 'TODO: please describe this field!',
08442         'type' => 'int',
08443         'not null' => TRUE,
08444       ),
08445     ),
08446     'primary key' => array(
08447       0 => 'nd_experiment_stock_dbxref_id',
08448     ),
08449     'foreign keys' => array(
08450       'dbxref' => array(
08451         'table' => 'dbxref',
08452         'columns' => array(
08453           'dbxref_id' => 'dbxref_id',
08454         ),
08455       ),
08456       'nd_experiment_stock' => array(
08457         'table' => 'nd_experiment_stock',
08458         'columns' => array(
08459           'nd_experiment_stock_id' => 'nd_experiment_stock_id',
08460         ),
08461       ),
08462     ),
08463     'table' => 'nd_experiment_stock_dbxref',
08464     'referring_tables' => NULL,
08465   );
08466   return $description;
08467 }
08481 function tripal_core_chado_schema_v1_2_nd_experiment_stockprop() {
08482   $description =  array(
08483     'description' => 'TODO: please describe this table!',
08484     'fields' => array(
08485       'nd_experiment_stockprop_id' => array(
08486         'description' => 'TODO: please describe this field!',
08487         'type' => 'serial',
08488         'not null' => TRUE,
08489       ),
08490       'nd_experiment_stock_id' => array(
08491         'description' => 'TODO: please describe this field!',
08492         'type' => 'int',
08493         'not null' => TRUE,
08494       ),
08495       'type_id' => array(
08496         'description' => 'TODO: please describe this field!',
08497         'type' => 'int',
08498         'not null' => TRUE,
08499       ),
08500       'value' => array(
08501         'description' => 'TODO: please describe this field!',
08502         'type' => 'text',
08503         'not null' => FALSE,
08504       ),
08505       'rank' => array(
08506         'description' => 'TODO: please describe this field!',
08507         'type' => 'int',
08508         'not null' => TRUE,
08509         'default' => 0,
08510       ),
08511     ),
08512     'primary key' => array(
08513       0 => 'nd_experiment_stockprop_id',
08514     ),
08515     'unique keys' => array(
08516       'nd_experiment_stockprop_c1' => array(
08517         0 => 'nd_experiment_stock_id',
08518         1 => 'type_id',
08519         2 => 'rank',
08520       ),
08521     ),
08522     'foreign keys' => array(
08523       'cvterm' => array(
08524         'table' => 'cvterm',
08525         'columns' => array(
08526           'type_id' => 'cvterm_id',
08527         ),
08528       ),
08529       'nd_experiment_stock' => array(
08530         'table' => 'nd_experiment_stock',
08531         'columns' => array(
08532           'nd_experiment_stock_id' => 'nd_experiment_stock_id',
08533         ),
08534       ),
08535     ),
08536     'table' => 'nd_experiment_stockprop',
08537     'referring_tables' => NULL,
08538   );
08539   return $description;
08540 }
08554 function tripal_core_chado_schema_v1_2_nd_experimentprop() {
08555   $description =  array(
08556     'description' => 'TODO: please describe this table!',
08557     'fields' => array(
08558       'nd_experimentprop_id' => array(
08559         'description' => 'TODO: please describe this field!',
08560         'type' => 'serial',
08561         'not null' => TRUE,
08562       ),
08563       'nd_experiment_id' => array(
08564         'description' => 'TODO: please describe this field!',
08565         'type' => 'int',
08566         'not null' => TRUE,
08567       ),
08568       'type_id' => array(
08569         'description' => 'TODO: please describe this field!',
08570         'type' => 'int',
08571         'not null' => TRUE,
08572       ),
08573       'value' => array(
08574         'description' => 'TODO: please describe this field!',
08575         'type' => 'text',
08576         'not null' => FALSE,
08577       ),
08578       'rank' => array(
08579         'description' => 'TODO: please describe this field!',
08580         'type' => 'int',
08581         'not null' => TRUE,
08582         'default' => 0,
08583       ),
08584     ),
08585     'primary key' => array(
08586       0 => 'nd_experimentprop_id',
08587     ),
08588     'unique keys' => array(
08589       'nd_experimentprop_c1' => array(
08590         0 => 'nd_experiment_id',
08591         1 => 'type_id',
08592         2 => 'rank',
08593       ),
08594     ),
08595     'foreign keys' => array(
08596       'cvterm' => array(
08597         'table' => 'cvterm',
08598         'columns' => array(
08599           'type_id' => 'cvterm_id',
08600         ),
08601       ),
08602       'nd_experiment' => array(
08603         'table' => 'nd_experiment',
08604         'columns' => array(
08605           'nd_experiment_id' => 'nd_experiment_id',
08606         ),
08607       ),
08608     ),
08609     'table' => 'nd_experimentprop',
08610     'referring_tables' => NULL,
08611   );
08612   return $description;
08613 }
08627 function tripal_core_chado_schema_v1_2_nd_geolocation() {
08628   $description =  array(
08629     'description' => 'TODO: please describe this table!',
08630     'fields' => array(
08631       'nd_geolocation_id' => array(
08632         'description' => 'TODO: please describe this field!',
08633         'type' => 'serial',
08634         'not null' => TRUE,
08635       ),
08636       'description' => array(
08637         'description' => 'TODO: please describe this field!',
08638         'type' => 'varchar',
08639         'length' => '255',
08640         'not null' => FALSE,
08641       ),
08642       'latitude' => array(
08643         'description' => 'TODO: please describe this field!',
08644         'type' => 'float',
08645         'not null' => FALSE,
08646       ),
08647       'longitude' => array(
08648         'description' => 'TODO: please describe this field!',
08649         'type' => 'float',
08650         'not null' => FALSE,
08651       ),
08652       'geodetic_datum' => array(
08653         'description' => 'TODO: please describe this field!',
08654         'type' => 'varchar',
08655         'length' => '32',
08656         'not null' => FALSE,
08657       ),
08658       'altitude' => array(
08659         'description' => 'TODO: please describe this field!',
08660         'type' => 'float',
08661         'not null' => FALSE,
08662       ),
08663     ),
08664     'primary key' => array(
08665       0 => 'nd_geolocation_id',
08666     ),
08667     'foreign keys' => array(
08668     ),
08669     'table' => 'nd_geolocation',
08670     'referring_tables' => array(
08671       0 => 'nd_experiment',
08672       1 => 'nd_geolocationprop',
08673     ),
08674   );
08675   return $description;
08676 }
08690 function tripal_core_chado_schema_v1_2_nd_geolocationprop() {
08691   $description =  array(
08692     'description' => 'TODO: please describe this table!',
08693     'fields' => array(
08694       'nd_geolocationprop_id' => array(
08695         'description' => 'TODO: please describe this field!',
08696         'type' => 'serial',
08697         'not null' => TRUE,
08698       ),
08699       'nd_geolocation_id' => array(
08700         'description' => 'TODO: please describe this field!',
08701         'type' => 'int',
08702         'not null' => TRUE,
08703       ),
08704       'type_id' => array(
08705         'description' => 'TODO: please describe this field!',
08706         'type' => 'int',
08707         'not null' => TRUE,
08708       ),
08709       'value' => array(
08710         'description' => 'TODO: please describe this field!',
08711         'type' => 'text',
08712         'not null' => FALSE,
08713       ),
08714       'rank' => array(
08715         'description' => 'TODO: please describe this field!',
08716         'type' => 'int',
08717         'not null' => TRUE,
08718         'default' => 0,
08719       ),
08720     ),
08721     'primary key' => array(
08722       0 => 'nd_geolocationprop_id',
08723     ),
08724     'unique keys' => array(
08725       'nd_geolocationprop_c1' => array(
08726         0 => 'nd_geolocation_id',
08727         1 => 'type_id',
08728         2 => 'rank',
08729       ),
08730     ),
08731     'foreign keys' => array(
08732       'cvterm' => array(
08733         'table' => 'cvterm',
08734         'columns' => array(
08735           'type_id' => 'cvterm_id',
08736         ),
08737       ),
08738       'nd_geolocation' => array(
08739         'table' => 'nd_geolocation',
08740         'columns' => array(
08741           'nd_geolocation_id' => 'nd_geolocation_id',
08742         ),
08743       ),
08744     ),
08745     'table' => 'nd_geolocationprop',
08746     'referring_tables' => NULL,
08747   );
08748   return $description;
08749 }
08763 function tripal_core_chado_schema_v1_2_nd_protocol() {
08764   $description =  array(
08765     'description' => 'TODO: please describe this table!',
08766     'fields' => array(
08767       'nd_protocol_id' => array(
08768         'description' => 'TODO: please describe this field!',
08769         'type' => 'serial',
08770         'not null' => TRUE,
08771       ),
08772       'name' => array(
08773         'description' => 'TODO: please describe this field!',
08774         'type' => 'varchar',
08775         'length' => '255',
08776         'not null' => TRUE,
08777       ),
08778       'type_id' => array(
08779         'description' => 'TODO: please describe this field!',
08780         'type' => 'int',
08781         'not null' => TRUE,
08782       ),
08783     ),
08784     'primary key' => array(
08785       0 => 'nd_protocol_id',
08786     ),
08787     'unique keys' => array(
08788       'name' => array(
08789         0 => 'name',
08790       ),
08791     ),
08792     'foreign keys' => array(
08793       'cvterm' => array(
08794         'table' => 'cvterm',
08795         'columns' => array(
08796           'type_id' => 'cvterm_id',
08797         ),
08798       ),
08799     ),
08800     'table' => 'nd_protocol',
08801     'referring_tables' => array(
08802       0 => 'nd_experiment_protocol',
08803       1 => 'nd_protocol_reagent',
08804       2 => 'nd_protocolprop',
08805     ),
08806   );
08807   return $description;
08808 }
08822 function tripal_core_chado_schema_v1_2_nd_protocol_reagent() {
08823   $description =  array(
08824     'description' => 'TODO: please describe this table!',
08825     'fields' => array(
08826       'nd_protocol_reagent_id' => array(
08827         'description' => 'TODO: please describe this field!',
08828         'type' => 'serial',
08829         'not null' => TRUE,
08830       ),
08831       'nd_protocol_id' => array(
08832         'description' => 'TODO: please describe this field!',
08833         'type' => 'int',
08834         'not null' => TRUE,
08835       ),
08836       'reagent_id' => array(
08837         'description' => 'TODO: please describe this field!',
08838         'type' => 'int',
08839         'not null' => TRUE,
08840       ),
08841       'type_id' => array(
08842         'description' => 'TODO: please describe this field!',
08843         'type' => 'int',
08844         'not null' => TRUE,
08845       ),
08846     ),
08847     'primary key' => array(
08848       0 => 'nd_protocol_reagent_id',
08849     ),
08850     'foreign keys' => array(
08851       'cvterm' => array(
08852         'table' => 'cvterm',
08853         'columns' => array(
08854           'type_id' => 'cvterm_id',
08855         ),
08856       ),
08857       'nd_protocol' => array(
08858         'table' => 'nd_protocol',
08859         'columns' => array(
08860           'nd_protocol_id' => 'nd_protocol_id',
08861         ),
08862       ),
08863       'nd_reagent' => array(
08864         'table' => 'nd_reagent',
08865         'columns' => array(
08866           'reagent_id' => 'nd_reagent_id',
08867         ),
08868       ),
08869     ),
08870     'table' => 'nd_protocol_reagent',
08871     'referring_tables' => NULL,
08872   );
08873   return $description;
08874 }
08888 function tripal_core_chado_schema_v1_2_nd_protocolprop() {
08889   $description =  array(
08890     'description' => 'TODO: please describe this table!',
08891     'fields' => array(
08892       'nd_protocolprop_id' => array(
08893         'description' => 'TODO: please describe this field!',
08894         'type' => 'serial',
08895         'not null' => TRUE,
08896       ),
08897       'nd_protocol_id' => array(
08898         'description' => 'TODO: please describe this field!',
08899         'type' => 'int',
08900         'not null' => TRUE,
08901       ),
08902       'type_id' => array(
08903         'description' => 'TODO: please describe this field!',
08904         'type' => 'int',
08905         'not null' => TRUE,
08906       ),
08907       'value' => array(
08908         'description' => 'TODO: please describe this field!',
08909         'type' => 'text',
08910         'not null' => FALSE,
08911       ),
08912       'rank' => array(
08913         'description' => 'TODO: please describe this field!',
08914         'type' => 'int',
08915         'not null' => TRUE,
08916         'default' => 0,
08917       ),
08918     ),
08919     'primary key' => array(
08920       0 => 'nd_protocolprop_id',
08921     ),
08922     'unique keys' => array(
08923       'nd_protocolprop_c1' => array(
08924         0 => 'nd_protocol_id',
08925         1 => 'type_id',
08926         2 => 'rank',
08927       ),
08928     ),
08929     'foreign keys' => array(
08930       'cvterm' => array(
08931         'table' => 'cvterm',
08932         'columns' => array(
08933           'type_id' => 'cvterm_id',
08934         ),
08935       ),
08936       'nd_protocol' => array(
08937         'table' => 'nd_protocol',
08938         'columns' => array(
08939           'nd_protocol_id' => 'nd_protocol_id',
08940         ),
08941       ),
08942     ),
08943     'table' => 'nd_protocolprop',
08944     'referring_tables' => NULL,
08945   );
08946   return $description;
08947 }
08961 function tripal_core_chado_schema_v1_2_nd_reagent() {
08962   $description =  array(
08963     'description' => 'TODO: please describe this table!',
08964     'fields' => array(
08965       'nd_reagent_id' => array(
08966         'description' => 'TODO: please describe this field!',
08967         'type' => 'serial',
08968         'not null' => TRUE,
08969       ),
08970       'name' => array(
08971         'description' => 'TODO: please describe this field!',
08972         'type' => 'varchar',
08973         'length' => '80',
08974         'not null' => TRUE,
08975       ),
08976       'type_id' => array(
08977         'description' => 'TODO: please describe this field!',
08978         'type' => 'int',
08979         'not null' => TRUE,
08980       ),
08981       'feature_id' => array(
08982         'description' => 'TODO: please describe this field!',
08983         'type' => 'int',
08984         'not null' => FALSE,
08985       ),
08986     ),
08987     'primary key' => array(
08988       0 => 'nd_reagent_id',
08989     ),
08990     'foreign keys' => array(
08991       'cvterm' => array(
08992         'table' => 'cvterm',
08993         'columns' => array(
08994           'type_id' => 'cvterm_id',
08995         ),
08996       ),
08997     ),
08998     'table' => 'nd_reagent',
08999     'referring_tables' => array(
09000       0 => 'nd_protocol_reagent',
09001       1 => 'nd_reagent_relationship',
09002       3 => 'nd_reagentprop',
09003     ),
09004   );
09005   return $description;
09006 }
09020 function tripal_core_chado_schema_v1_2_nd_reagent_relationship() {
09021   $description =  array(
09022     'description' => 'TODO: please describe this table!',
09023     'fields' => array(
09024       'nd_reagent_relationship_id' => array(
09025         'description' => 'TODO: please describe this field!',
09026         'type' => 'serial',
09027         'not null' => TRUE,
09028       ),
09029       'subject_reagent_id' => array(
09030         'description' => 'TODO: please describe this field!',
09031         'type' => 'int',
09032         'not null' => TRUE,
09033       ),
09034       'object_reagent_id' => array(
09035         'description' => 'TODO: please describe this field!',
09036         'type' => 'int',
09037         'not null' => TRUE,
09038       ),
09039       'type_id' => array(
09040         'description' => 'TODO: please describe this field!',
09041         'type' => 'int',
09042         'not null' => TRUE,
09043       ),
09044     ),
09045     'primary key' => array(
09046       0 => 'nd_reagent_relationship_id',
09047     ),
09048     'foreign keys' => array(
09049       'cvterm' => array(
09050         'table' => 'cvterm',
09051         'columns' => array(
09052           'type_id' => 'cvterm_id',
09053         ),
09054       ),
09055       'nd_reagent' => array(
09056         'table' => 'nd_reagent',
09057         'columns' => array(
09058           'subject_reagent_id' => 'nd_reagent_id',
09059           'object_reagent_id' => 'nd_reagent_id',
09060         ),
09061       ),
09062     ),
09063     'table' => 'nd_reagent_relationship',
09064     'referring_tables' => NULL,
09065   );
09066   return $description;
09067 }
09081 function tripal_core_chado_schema_v1_2_nd_reagentprop() {
09082   $description =  array(
09083     'description' => 'TODO: please describe this table!',
09084     'fields' => array(
09085       'nd_reagentprop_id' => array(
09086         'description' => 'TODO: please describe this field!',
09087         'type' => 'serial',
09088         'not null' => TRUE,
09089       ),
09090       'nd_reagent_id' => array(
09091         'description' => 'TODO: please describe this field!',
09092         'type' => 'int',
09093         'not null' => TRUE,
09094       ),
09095       'type_id' => array(
09096         'description' => 'TODO: please describe this field!',
09097         'type' => 'int',
09098         'not null' => TRUE,
09099       ),
09100       'value' => array(
09101         'description' => 'TODO: please describe this field!',
09102         'type' => 'text',
09103         'not null' => FALSE,
09104       ),
09105       'rank' => array(
09106         'description' => 'TODO: please describe this field!',
09107         'type' => 'int',
09108         'not null' => TRUE,
09109         'default' => 0,
09110       ),
09111     ),
09112     'primary key' => array(
09113       0 => 'nd_reagentprop_id',
09114     ),
09115     'unique keys' => array(
09116       'nd_reagentprop_c1' => array(
09117         0 => 'nd_reagent_id',
09118         1 => 'type_id',
09119         2 => 'rank',
09120       ),
09121     ),
09122     'foreign keys' => array(
09123       'cvterm' => array(
09124         'table' => 'cvterm',
09125         'columns' => array(
09126           'type_id' => 'cvterm_id',
09127         ),
09128       ),
09129       'nd_reagent' => array(
09130         'table' => 'nd_reagent',
09131         'columns' => array(
09132           'nd_reagent_id' => 'nd_reagent_id',
09133         ),
09134       ),
09135     ),
09136     'table' => 'nd_reagentprop',
09137     'referring_tables' => NULL,
09138   );
09139   return $description;
09140 }
09154 function tripal_core_chado_schema_v1_2_organism() {
09155   $description =  array(
09156     'description' => 'TODO: please describe this table!',
09157     'fields' => array(
09158       'organism_id' => array(
09159         'description' => 'TODO: please describe this field!',
09160         'type' => 'serial',
09161         'not null' => TRUE,
09162       ),
09163       'abbreviation' => array(
09164         'description' => 'TODO: please describe this field!',
09165         'type' => 'varchar',
09166         'length' => '255',
09167         'not null' => FALSE,
09168       ),
09169       'genus' => array(
09170         'description' => 'TODO: please describe this field!',
09171         'type' => 'varchar',
09172         'length' => '255',
09173         'not null' => TRUE,
09174       ),
09175       'species' => array(
09176         'description' => 'TODO: please describe this field!',
09177         'type' => 'varchar',
09178         'length' => '255',
09179         'not null' => TRUE,
09180       ),
09181       'common_name' => array(
09182         'description' => 'TODO: please describe this field!',
09183         'type' => 'varchar',
09184         'length' => '255',
09185         'not null' => FALSE,
09186       ),
09187       'comment' => array(
09188         'description' => 'TODO: please describe this field!',
09189         'type' => 'text',
09190         'not null' => FALSE,
09191       ),
09192     ),
09193     'primary key' => array(
09194       0 => 'organism_id',
09195     ),
09196     'unique keys' => array(
09197       'organism_c1' => array(
09198         0 => 'genus',
09199         1 => 'species',
09200       ),
09201     ),
09202     'foreign keys' => array(
09203     ),
09204     'referring_tables' => array(
09205       0 => 'biomaterial',
09206       1 => 'cell_line',
09207       2 => 'feature',
09208       3 => 'library',
09209       4 => 'organism_dbxref',
09210       5 => 'organismprop',
09211       6 => 'phenotype_comparison',
09212       7 => 'phylonode_organism',
09213       8 => 'stock',
09214     ),
09215     'table' => 'organism',
09216   );
09217   return $description;
09218 }
09232 function tripal_core_chado_schema_v1_2_organism_dbxref() {
09233   $description =  array(
09234     'description' => 'TODO: please describe this table!',
09235     'fields' => array(
09236       'organism_dbxref_id' => array(
09237         'description' => 'TODO: please describe this field!',
09238         'type' => 'serial',
09239         'not null' => TRUE,
09240       ),
09241       'organism_id' => array(
09242         'description' => 'TODO: please describe this field!',
09243         'type' => 'int',
09244         'not null' => TRUE,
09245       ),
09246       'dbxref_id' => array(
09247         'description' => 'TODO: please describe this field!',
09248         'type' => 'int',
09249         'not null' => TRUE,
09250       ),
09251     ),
09252     'primary key' => array(
09253       0 => 'organism_dbxref_id',
09254     ),
09255     'unique keys' => array(
09256       'organism_dbxref_c1' => array(
09257         0 => 'organism_id',
09258         1 => 'dbxref_id',
09259       ),
09260     ),
09261     'indexes' => array(
09262       'organism_dbxref_idx1' => array(
09263         0 => 'organism_id',
09264       ),
09265       'organism_dbxref_idx2' => array(
09266         0 => 'dbxref_id',
09267       ),
09268     ),
09269     'foreign keys' => array(
09270       'organism' => array(
09271         'table' => 'organism',
09272         'columns' => array(
09273           'organism_id' => 'organism_id',
09274         ),
09275       ),
09276       'dbxref' => array(
09277         'table' => 'dbxref',
09278         'columns' => array(
09279           'dbxref_id' => 'dbxref_id',
09280         ),
09281       ),
09282     ),
09283     'table' => 'organism_dbxref',
09284     'referring_tables' => NULL,
09285   );
09286   return $description;
09287 }
09301 function tripal_core_chado_schema_v1_2_organismprop() {
09302   $description =  array(
09303     'description' => 'TODO: please describe this table!',
09304     'fields' => array(
09305       'organismprop_id' => array(
09306         'description' => 'TODO: please describe this field!',
09307         'type' => 'serial',
09308         'not null' => TRUE,
09309       ),
09310       'organism_id' => array(
09311         'description' => 'TODO: please describe this field!',
09312         'type' => 'int',
09313         'not null' => TRUE,
09314       ),
09315       'type_id' => array(
09316         'description' => 'TODO: please describe this field!',
09317         'type' => 'int',
09318         'not null' => TRUE,
09319       ),
09320       'value' => array(
09321         'description' => 'TODO: please describe this field!',
09322         'type' => 'text',
09323         'not null' => FALSE,
09324       ),
09325       'rank' => array(
09326         'description' => 'TODO: please describe this field!',
09327         'type' => 'int',
09328         'not null' => TRUE,
09329         'default' => 0,
09330       ),
09331     ),
09332     'primary key' => array(
09333       0 => 'organismprop_id',
09334     ),
09335     'unique keys' => array(
09336       'organismprop_c1' => array(
09337         0 => 'organism_id',
09338         1 => 'type_id',
09339         2 => 'rank',
09340       ),
09341     ),
09342     'indexes' => array(
09343       'organismprop_idx1' => array(
09344         0 => 'organism_id',
09345       ),
09346       'organismprop_idx2' => array(
09347         0 => 'type_id',
09348       ),
09349     ),
09350     'foreign keys' => array(
09351       'organism' => array(
09352         'table' => 'organism',
09353         'columns' => array(
09354           'organism_id' => 'organism_id',
09355         ),
09356       ),
09357       'cvterm' => array(
09358         'table' => 'cvterm',
09359         'columns' => array(
09360           'type_id' => 'cvterm_id',
09361         ),
09362       ),
09363     ),
09364     'table' => 'organismprop',
09365     'referring_tables' => NULL,
09366   );
09367   return $description;
09368 }
09382 function tripal_core_chado_schema_v1_2_phendesc() {
09383   $description =  array(
09384     'description' => 'TODO: please describe this table!',
09385     'fields' => array(
09386       'phendesc_id' => array(
09387         'description' => 'TODO: please describe this field!',
09388         'type' => 'serial',
09389         'not null' => TRUE,
09390       ),
09391       'genotype_id' => array(
09392         'description' => 'TODO: please describe this field!',
09393         'type' => 'int',
09394         'not null' => TRUE,
09395       ),
09396       'environment_id' => array(
09397         'description' => 'TODO: please describe this field!',
09398         'type' => 'int',
09399         'not null' => TRUE,
09400       ),
09401       'description' => array(
09402         'description' => 'TODO: please describe this field!',
09403         'type' => 'text',
09404         'not null' => TRUE,
09405       ),
09406       'type_id' => array(
09407         'description' => 'TODO: please describe this field!',
09408         'type' => 'int',
09409         'not null' => TRUE,
09410       ),
09411       'pub_id' => array(
09412         'description' => 'TODO: please describe this field!',
09413         'type' => 'int',
09414         'not null' => TRUE,
09415       ),
09416     ),
09417     'primary key' => array(
09418       0 => 'phendesc_id',
09419     ),
09420     'unique keys' => array(
09421       'phendesc_c1' => array(
09422         0 => 'genotype_id',
09423         1 => 'environment_id',
09424         2 => 'type_id',
09425         3 => 'pub_id',
09426       ),
09427     ),
09428     'indexes' => array(
09429       'phendesc_idx1' => array(
09430         0 => 'genotype_id',
09431       ),
09432       'phendesc_idx2' => array(
09433         0 => 'environment_id',
09434       ),
09435       'phendesc_idx3' => array(
09436         0 => 'pub_id',
09437       ),
09438     ),
09439     'foreign keys' => array(
09440       'cvterm' => array(
09441         'table' => 'cvterm',
09442         'columns' => array(
09443           'type_id' => 'cvterm_id',
09444         ),
09445       ),
09446       'pub' => array(
09447         'table' => 'pub',
09448         'columns' => array(
09449           'pub_id' => 'pub_id',
09450         ),
09451       ),
09452       'genotype' => array(
09453         'table' => 'genotype',
09454         'columns' => array(
09455           'genotype_id' => 'genotype_id',
09456         ),
09457       ),
09458       'environment' => array(
09459         'table' => 'environment',
09460         'columns' => array(
09461           'environment_id' => 'environment_id',
09462         ),
09463       ),
09464     ),
09465     'table' => 'phendesc',
09466     'referring_tables' => NULL,
09467   );
09468   return $description;
09469 }
09483 function tripal_core_chado_schema_v1_2_phenotype() {
09484   $description =  array(
09485     'description' => 'TODO: please describe this table!',
09486     'fields' => array(
09487       'phenotype_id' => array(
09488         'description' => 'TODO: please describe this field!',
09489         'type' => 'serial',
09490         'not null' => TRUE,
09491       ),
09492       'uniquename' => array(
09493         'description' => 'TODO: please describe this field!',
09494         'type' => 'text',
09495         'not null' => TRUE,
09496       ),
09497       'name' => array(
09498         'description' => 'TODO: please describe this field!',
09499         'type' => 'text',
09500         'not null' => FALSE,
09501       ),
09502       'observable_id' => array(
09503         'description' => 'TODO: please describe this field!',
09504         'type' => 'int',
09505         'not null' => FALSE,
09506       ),
09507       'attr_id' => array(
09508         'description' => 'TODO: please describe this field!',
09509         'type' => 'int',
09510         'not null' => FALSE,
09511       ),
09512       'value' => array(
09513         'description' => 'TODO: please describe this field!',
09514         'type' => 'text',
09515         'not null' => FALSE,
09516       ),
09517       'cvalue_id' => array(
09518         'description' => 'TODO: please describe this field!',
09519         'type' => 'int',
09520         'not null' => FALSE,
09521       ),
09522       'assay_id' => array(
09523         'description' => 'TODO: please describe this field!',
09524         'type' => 'int',
09525         'not null' => FALSE,
09526       ),
09527     ),
09528     'primary key' => array(
09529       0 => 'phenotype_id',
09530     ),
09531     'unique keys' => array(
09532       'phenotype_c1' => array(
09533         0 => 'uniquename',
09534       ),
09535     ),
09536     'indexes' => array(
09537       'phenotype_idx1' => array(
09538         0 => 'cvalue_id',
09539       ),
09540       'phenotype_idx2' => array(
09541         0 => 'observable_id',
09542       ),
09543       'phenotype_idx3' => array(
09544         0 => 'attr_id',
09545       ),
09546     ),
09547     'foreign keys' => array(
09548       'cvterm' => array(
09549         'table' => 'cvterm',
09550         'columns' => array(
09551           'observable_id' => 'cvterm_id',
09552           'attr_id' => 'cvterm_id',
09553           'cvalue_id' => 'cvterm_id',
09554           'assay_id' => 'cvterm_id',
09555         ),
09556       ),
09557     ),
09558     'table' => 'phenotype',
09559     'referring_tables' => array(
09560       0 => 'feature_phenotype',
09561       1 => 'nd_experiment_phenotype',
09562       2 => 'phenotype_comparison',
09563       4 => 'phenotype_cvterm',
09564       5 => 'phenstatement',
09565     ),
09566   );
09567   return $description;
09568 }
09582 function tripal_core_chado_schema_v1_2_phenotype_comparison() {
09583   $description =  array(
09584     'description' => 'TODO: please describe this table!',
09585     'fields' => array(
09586       'phenotype_comparison_id' => array(
09587         'description' => 'TODO: please describe this field!',
09588         'type' => 'serial',
09589         'not null' => TRUE,
09590       ),
09591       'genotype1_id' => array(
09592         'description' => 'TODO: please describe this field!',
09593         'type' => 'int',
09594         'not null' => TRUE,
09595       ),
09596       'environment1_id' => array(
09597         'description' => 'TODO: please describe this field!',
09598         'type' => 'int',
09599         'not null' => TRUE,
09600       ),
09601       'genotype2_id' => array(
09602         'description' => 'TODO: please describe this field!',
09603         'type' => 'int',
09604         'not null' => TRUE,
09605       ),
09606       'environment2_id' => array(
09607         'description' => 'TODO: please describe this field!',
09608         'type' => 'int',
09609         'not null' => TRUE,
09610       ),
09611       'phenotype1_id' => array(
09612         'description' => 'TODO: please describe this field!',
09613         'type' => 'int',
09614         'not null' => TRUE,
09615       ),
09616       'phenotype2_id' => array(
09617         'description' => 'TODO: please describe this field!',
09618         'type' => 'int',
09619         'not null' => FALSE,
09620       ),
09621       'pub_id' => array(
09622         'description' => 'TODO: please describe this field!',
09623         'type' => 'int',
09624         'not null' => TRUE,
09625       ),
09626       'organism_id' => array(
09627         'description' => 'TODO: please describe this field!',
09628         'type' => 'int',
09629         'not null' => TRUE,
09630       ),
09631     ),
09632     'primary key' => array(
09633       0 => 'phenotype_comparison_id',
09634     ),
09635     'unique keys' => array(
09636       'phenotype_comparison_c1' => array(
09637         0 => 'genotype1_id',
09638         1 => 'environment1_id',
09639         2 => 'genotype2_id',
09640         3 => 'environment2_id',
09641         4 => 'phenotype1_id',
09642         5 => 'pub_id',
09643       ),
09644     ),
09645     'indexes' => array(
09646       'phenotype_comparison_idx1' => array(
09647         0 => 'genotype1_id',
09648       ),
09649       'phenotype_comparison_idx2' => array(
09650         0 => 'genotype2_id',
09651       ),
09652       'phenotype_comparison_idx4' => array(
09653         0 => 'pub_id',
09654       ),
09655     ),
09656     'foreign keys' => array(
09657       'organism' => array(
09658         'table' => 'organism',
09659         'columns' => array(
09660           'organism_id' => 'organism_id',
09661         ),
09662       ),
09663       'pub' => array(
09664         'table' => 'pub',
09665         'columns' => array(
09666           'pub_id' => 'pub_id',
09667         ),
09668       ),
09669       'genotype' => array(
09670         'table' => 'genotype',
09671         'columns' => array(
09672           'genotype1_id' => 'genotype_id',
09673           'genotype2_id' => 'genotype_id',
09674         ),
09675       ),
09676       'environment' => array(
09677         'table' => 'environment',
09678         'columns' => array(
09679           'environment1_id' => 'environment_id',
09680           'environment2_id' => 'environment_id',
09681         ),
09682       ),
09683       'phenotype' => array(
09684         'table' => 'phenotype',
09685         'columns' => array(
09686           'phenotype1_id' => 'phenotype_id',
09687           'phenotype2_id' => 'phenotype_id',
09688         ),
09689       ),
09690     ),
09691     'table' => 'phenotype_comparison',
09692     'referring_tables' => array(
09693       0 => 'phenotype_comparison_cvterm',
09694     ),
09695   );
09696   return $description;
09697 }
09711 function tripal_core_chado_schema_v1_2_phenotype_comparison_cvterm() {
09712   $description =  array(
09713     'description' => 'TODO: please describe this table!',
09714     'fields' => array(
09715       'phenotype_comparison_cvterm_id' => array(
09716         'description' => 'TODO: please describe this field!',
09717         'type' => 'serial',
09718         'not null' => TRUE,
09719       ),
09720       'phenotype_comparison_id' => array(
09721         'description' => 'TODO: please describe this field!',
09722         'type' => 'int',
09723         'not null' => TRUE,
09724       ),
09725       'cvterm_id' => array(
09726         'description' => 'TODO: please describe this field!',
09727         'type' => 'int',
09728         'not null' => TRUE,
09729       ),
09730       'pub_id' => array(
09731         'description' => 'TODO: please describe this field!',
09732         'type' => 'int',
09733         'not null' => TRUE,
09734       ),
09735       'rank' => array(
09736         'description' => 'TODO: please describe this field!',
09737         'type' => 'int',
09738         'not null' => TRUE,
09739         'default' => 0,
09740       ),
09741     ),
09742     'primary key' => array(
09743       0 => 'phenotype_comparison_cvterm_id',
09744     ),
09745     'unique keys' => array(
09746       'phenotype_comparison_cvterm_c1' => array(
09747         0 => 'phenotype_comparison_id',
09748         1 => 'cvterm_id',
09749       ),
09750     ),
09751     'indexes' => array(
09752       'phenotype_comparison_cvterm_idx1' => array(
09753         0 => 'phenotype_comparison_id',
09754       ),
09755       'phenotype_comparison_cvterm_idx2' => array(
09756         0 => 'cvterm_id',
09757       ),
09758     ),
09759     'foreign keys' => array(
09760       'cvterm' => array(
09761         'table' => 'cvterm',
09762         'columns' => array(
09763           'cvterm_id' => 'cvterm_id',
09764         ),
09765       ),
09766       'pub' => array(
09767         'table' => 'pub',
09768         'columns' => array(
09769           'pub_id' => 'pub_id',
09770         ),
09771       ),
09772       'phenotype_comparison' => array(
09773         'table' => 'phenotype_comparison',
09774         'columns' => array(
09775           'phenotype_comparison_id' => 'phenotype_comparison_id',
09776         ),
09777       ),
09778     ),
09779     'table' => 'phenotype_comparison_cvterm',
09780     'referring_tables' => NULL,
09781   );
09782   return $description;
09783 }
09797 function tripal_core_chado_schema_v1_2_phenotype_cvterm() {
09798   $description =  array(
09799     'description' => 'TODO: please describe this table!',
09800     'fields' => array(
09801       'phenotype_cvterm_id' => array(
09802         'description' => 'TODO: please describe this field!',
09803         'type' => 'serial',
09804         'not null' => TRUE,
09805       ),
09806       'phenotype_id' => array(
09807         'description' => 'TODO: please describe this field!',
09808         'type' => 'int',
09809         'not null' => TRUE,
09810       ),
09811       'cvterm_id' => array(
09812         'description' => 'TODO: please describe this field!',
09813         'type' => 'int',
09814         'not null' => TRUE,
09815       ),
09816       'rank' => array(
09817         'description' => 'TODO: please describe this field!',
09818         'type' => 'int',
09819         'not null' => TRUE,
09820         'default' => 0,
09821       ),
09822     ),
09823     'primary key' => array(
09824       0 => 'phenotype_cvterm_id',
09825     ),
09826     'unique keys' => array(
09827       'phenotype_cvterm_c1' => array(
09828         0 => 'phenotype_id',
09829         1 => 'cvterm_id',
09830         2 => 'rank',
09831       ),
09832     ),
09833     'indexes' => array(
09834       'phenotype_cvterm_idx1' => array(
09835         0 => 'phenotype_id',
09836       ),
09837       'phenotype_cvterm_idx2' => array(
09838         0 => 'cvterm_id',
09839       ),
09840     ),
09841     'foreign keys' => array(
09842       'cvterm' => array(
09843         'table' => 'cvterm',
09844         'columns' => array(
09845           'cvterm_id' => 'cvterm_id',
09846         ),
09847       ),
09848       'phenotype' => array(
09849         'table' => 'phenotype',
09850         'columns' => array(
09851           'phenotype_id' => 'phenotype_id',
09852         ),
09853       ),
09854     ),
09855     'table' => 'phenotype_cvterm',
09856     'referring_tables' => NULL,
09857   );
09858   return $description;
09859 }
09873 function tripal_core_chado_schema_v1_2_phenstatement() {
09874   $description =  array(
09875     'description' => 'TODO: please describe this table!',
09876     'fields' => array(
09877       'phenstatement_id' => array(
09878         'description' => 'TODO: please describe this field!',
09879         'type' => 'serial',
09880         'not null' => TRUE,
09881       ),
09882       'genotype_id' => array(
09883         'description' => 'TODO: please describe this field!',
09884         'type' => 'int',
09885         'not null' => TRUE,
09886       ),
09887       'environment_id' => array(
09888         'description' => 'TODO: please describe this field!',
09889         'type' => 'int',
09890         'not null' => TRUE,
09891       ),
09892       'phenotype_id' => array(
09893         'description' => 'TODO: please describe this field!',
09894         'type' => 'int',
09895         'not null' => TRUE,
09896       ),
09897       'type_id' => array(
09898         'description' => 'TODO: please describe this field!',
09899         'type' => 'int',
09900         'not null' => TRUE,
09901       ),
09902       'pub_id' => array(
09903         'description' => 'TODO: please describe this field!',
09904         'type' => 'int',
09905         'not null' => TRUE,
09906       ),
09907     ),
09908     'primary key' => array(
09909       0 => 'phenstatement_id',
09910     ),
09911     'unique keys' => array(
09912       'phenstatement_c1' => array(
09913         0 => 'genotype_id',
09914         1 => 'phenotype_id',
09915         2 => 'environment_id',
09916         3 => 'type_id',
09917         4 => 'pub_id',
09918       ),
09919     ),
09920     'indexes' => array(
09921       'phenstatement_idx1' => array(
09922         0 => 'genotype_id',
09923       ),
09924       'phenstatement_idx2' => array(
09925         0 => 'phenotype_id',
09926       ),
09927     ),
09928     'foreign keys' => array(
09929       'cvterm' => array(
09930         'table' => 'cvterm',
09931         'columns' => array(
09932           'type_id' => 'cvterm_id',
09933         ),
09934       ),
09935       'pub' => array(
09936         'table' => 'pub',
09937         'columns' => array(
09938           'pub_id' => 'pub_id',
09939         ),
09940       ),
09941       'genotype' => array(
09942         'table' => 'genotype',
09943         'columns' => array(
09944           'genotype_id' => 'genotype_id',
09945         ),
09946       ),
09947       'environment' => array(
09948         'table' => 'environment',
09949         'columns' => array(
09950           'environment_id' => 'environment_id',
09951         ),
09952       ),
09953       'phenotype' => array(
09954         'table' => 'phenotype',
09955         'columns' => array(
09956           'phenotype_id' => 'phenotype_id',
09957         ),
09958       ),
09959     ),
09960     'table' => 'phenstatement',
09961     'referring_tables' => NULL,
09962   );
09963   return $description;
09964 }
09978 function tripal_core_chado_schema_v1_2_phylonode() {
09979   $description =  array(
09980     'description' => 'TODO: please describe this table!',
09981     'fields' => array(
09982       'phylonode_id' => array(
09983         'description' => 'TODO: please describe this field!',
09984         'type' => 'serial',
09985         'not null' => TRUE,
09986       ),
09987       'phylotree_id' => array(
09988         'description' => 'TODO: please describe this field!',
09989         'type' => 'int',
09990         'not null' => TRUE,
09991       ),
09992       'parent_phylonode_id' => array(
09993         'description' => 'TODO: please describe this field!',
09994         'type' => 'int',
09995         'not null' => FALSE,
09996       ),
09997       'left_idx' => array(
09998         'description' => 'TODO: please describe this field!',
09999         'type' => 'int',
10000         'not null' => TRUE,
10001       ),
10002       'right_idx' => array(
10003         'description' => 'TODO: please describe this field!',
10004         'type' => 'int',
10005         'not null' => TRUE,
10006       ),
10007       'type_id' => array(
10008         'description' => 'TODO: please describe this field!',
10009         'type' => 'int',
10010         'not null' => FALSE,
10011       ),
10012       'feature_id' => array(
10013         'description' => 'TODO: please describe this field!',
10014         'type' => 'int',
10015         'not null' => FALSE,
10016       ),
10017       'label' => array(
10018         'description' => 'TODO: please describe this field!',
10019         'type' => 'varchar',
10020         'length' => '255',
10021         'not null' => FALSE,
10022       ),
10023       'distance' => array(
10024         'description' => 'TODO: please describe this field!',
10025         'type' => 'float',
10026         'size' => 'big',
10027         'not null' => FALSE,
10028       ),
10029     ),
10030     'primary key' => array(
10031       0 => 'phylonode_id',
10032     ),
10033     'unique keys' => array(
10034       'phylotree_id' => array(
10035         0 => 'phylotree_id',
10036         1 => 'left_idx',
10037       ),
10038       'phylonode_phylotree_id_key1' => array(
10039         0 => 'phylotree_id',
10040         1 => 'right_idx',
10041       ),
10042     ),
10043     'foreign keys' => array(
10044       'cvterm' => array(
10045         'table' => 'cvterm',
10046         'columns' => array(
10047           'type_id' => 'cvterm_id',
10048         ),
10049       ),
10050       'feature' => array(
10051         'table' => 'feature',
10052         'columns' => array(
10053           'feature_id' => 'feature_id',
10054         ),
10055       ),
10056       'phylonode' => array(
10057         'table' => 'phylonode',
10058         'columns' => array(
10059           'parent_phylonode_id' => 'phylonode_id',
10060         ),
10061       ),
10062       'phylotree' => array(
10063         'table' => 'phylotree',
10064         'columns' => array(
10065           'phylotree_id' => 'phylotree_id',
10066         ),
10067       ),
10068     ),
10069     'table' => 'phylonode',
10070     'referring_tables' => array(
10071       0 => 'phylonode',
10072       1 => 'phylonode_dbxref',
10073       2 => 'phylonode_organism',
10074       3 => 'phylonode_pub',
10075       4 => 'phylonode_relationship',
10076       6 => 'phylonodeprop',
10077     ),
10078   );
10079   return $description;
10080 }
10094 function tripal_core_chado_schema_v1_2_phylonode_dbxref() {
10095   $description =  array(
10096     'description' => 'TODO: please describe this table!',
10097     'fields' => array(
10098       'phylonode_dbxref_id' => array(
10099         'description' => 'TODO: please describe this field!',
10100         'type' => 'serial',
10101         'not null' => TRUE,
10102       ),
10103       'phylonode_id' => array(
10104         'description' => 'TODO: please describe this field!',
10105         'type' => 'int',
10106         'not null' => TRUE,
10107       ),
10108       'dbxref_id' => array(
10109         'description' => 'TODO: please describe this field!',
10110         'type' => 'int',
10111         'not null' => TRUE,
10112       ),
10113     ),
10114     'primary key' => array(
10115       0 => 'phylonode_dbxref_id',
10116     ),
10117     'unique keys' => array(
10118       'phylonode_id' => array(
10119         0 => 'phylonode_id',
10120         1 => 'dbxref_id',
10121       ),
10122     ),
10123     'indexes' => array(
10124       'phylonode_dbxref_idx1' => array(
10125         0 => 'phylonode_id',
10126       ),
10127       'phylonode_dbxref_idx2' => array(
10128         0 => 'dbxref_id',
10129       ),
10130     ),
10131     'foreign keys' => array(
10132       'dbxref' => array(
10133         'table' => 'dbxref',
10134         'columns' => array(
10135           'dbxref_id' => 'dbxref_id',
10136         ),
10137       ),
10138       'phylonode' => array(
10139         'table' => 'phylonode',
10140         'columns' => array(
10141           'phylonode_id' => 'phylonode_id',
10142         ),
10143       ),
10144     ),
10145     'table' => 'phylonode_dbxref',
10146     'referring_tables' => NULL,
10147   );
10148   return $description;
10149 }
10163 function tripal_core_chado_schema_v1_2_phylonode_organism() {
10164   $description =  array(
10165     'description' => 'TODO: please describe this table!',
10166     'fields' => array(
10167       'phylonode_organism_id' => array(
10168         'description' => 'TODO: please describe this field!',
10169         'type' => 'serial',
10170         'not null' => TRUE,
10171       ),
10172       'phylonode_id' => array(
10173         'description' => 'TODO: please describe this field!',
10174         'type' => 'int',
10175         'not null' => TRUE,
10176       ),
10177       'organism_id' => array(
10178         'description' => 'TODO: please describe this field!',
10179         'type' => 'int',
10180         'not null' => TRUE,
10181       ),
10182     ),
10183     'primary key' => array(
10184       0 => 'phylonode_organism_id',
10185     ),
10186     'unique keys' => array(
10187       'phylonode_id' => array(
10188         0 => 'phylonode_id',
10189       ),
10190     ),
10191     'indexes' => array(
10192       'phylonode_organism_idx1' => array(
10193         0 => 'phylonode_id',
10194       ),
10195       'phylonode_organism_idx2' => array(
10196         0 => 'organism_id',
10197       ),
10198     ),
10199     'foreign keys' => array(
10200       'organism' => array(
10201         'table' => 'organism',
10202         'columns' => array(
10203           'organism_id' => 'organism_id',
10204         ),
10205       ),
10206       'phylonode' => array(
10207         'table' => 'phylonode',
10208         'columns' => array(
10209           'phylonode_id' => 'phylonode_id',
10210         ),
10211       ),
10212     ),
10213     'table' => 'phylonode_organism',
10214     'referring_tables' => NULL,
10215   );
10216   return $description;
10217 }
10231 function tripal_core_chado_schema_v1_2_phylonode_pub() {
10232   $description =  array(
10233     'description' => 'TODO: please describe this table!',
10234     'fields' => array(
10235       'phylonode_pub_id' => array(
10236         'description' => 'TODO: please describe this field!',
10237         'type' => 'serial',
10238         'not null' => TRUE,
10239       ),
10240       'phylonode_id' => array(
10241         'description' => 'TODO: please describe this field!',
10242         'type' => 'int',
10243         'not null' => TRUE,
10244       ),
10245       'pub_id' => array(
10246         'description' => 'TODO: please describe this field!',
10247         'type' => 'int',
10248         'not null' => TRUE,
10249       ),
10250     ),
10251     'primary key' => array(
10252       0 => 'phylonode_pub_id',
10253     ),
10254     'unique keys' => array(
10255       'phylonode_id' => array(
10256         0 => 'phylonode_id',
10257         1 => 'pub_id',
10258       ),
10259     ),
10260     'indexes' => array(
10261       'phylonode_pub_idx1' => array(
10262         0 => 'phylonode_id',
10263       ),
10264       'phylonode_pub_idx2' => array(
10265         0 => 'pub_id',
10266       ),
10267     ),
10268     'foreign keys' => array(
10269       'pub' => array(
10270         'table' => 'pub',
10271         'columns' => array(
10272           'pub_id' => 'pub_id',
10273         ),
10274       ),
10275       'phylonode' => array(
10276         'table' => 'phylonode',
10277         'columns' => array(
10278           'phylonode_id' => 'phylonode_id',
10279         ),
10280       ),
10281     ),
10282     'table' => 'phylonode_pub',
10283     'referring_tables' => NULL,
10284   );
10285   return $description;
10286 }
10300 function tripal_core_chado_schema_v1_2_phylonode_relationship() {
10301   $description =  array(
10302     'description' => 'TODO: please describe this table!',
10303     'fields' => array(
10304       'phylonode_relationship_id' => array(
10305         'description' => 'TODO: please describe this field!',
10306         'type' => 'serial',
10307         'not null' => TRUE,
10308       ),
10309       'subject_id' => array(
10310         'description' => 'TODO: please describe this field!',
10311         'type' => 'int',
10312         'not null' => TRUE,
10313       ),
10314       'object_id' => array(
10315         'description' => 'TODO: please describe this field!',
10316         'type' => 'int',
10317         'not null' => TRUE,
10318       ),
10319       'type_id' => array(
10320         'description' => 'TODO: please describe this field!',
10321         'type' => 'int',
10322         'not null' => TRUE,
10323       ),
10324       'rank' => array(
10325         'description' => 'TODO: please describe this field!',
10326         'type' => 'int',
10327         'not null' => FALSE,
10328       ),
10329       'phylotree_id' => array(
10330         'description' => 'TODO: please describe this field!',
10331         'type' => 'int',
10332         'not null' => TRUE,
10333       ),
10334     ),
10335     'primary key' => array(
10336       0 => 'phylonode_relationship_id',
10337     ),
10338     'unique keys' => array(
10339       'subject_id' => array(
10340         0 => 'subject_id',
10341         1 => 'object_id',
10342         2 => 'type_id',
10343       ),
10344     ),
10345     'indexes' => array(
10346       'phylonode_relationship_idx1' => array(
10347         0 => 'subject_id',
10348       ),
10349       'phylonode_relationship_idx2' => array(
10350         0 => 'object_id',
10351       ),
10352       'phylonode_relationship_idx3' => array(
10353         0 => 'type_id',
10354       ),
10355     ),
10356     'foreign keys' => array(
10357       'cvterm' => array(
10358         'table' => 'cvterm',
10359         'columns' => array(
10360           'type_id' => 'cvterm_id',
10361         ),
10362       ),
10363       'phylonode' => array(
10364         'table' => 'phylonode',
10365         'columns' => array(
10366           'subject_id' => 'phylonode_id',
10367           'object_id' => 'phylonode_id',
10368         ),
10369       ),
10370       'phylotree' => array(
10371         'table' => 'phylotree',
10372         'columns' => array(
10373           'phylotree_id' => 'phylotree_id',
10374         ),
10375       ),
10376     ),
10377     'table' => 'phylonode_relationship',
10378     'referring_tables' => NULL,
10379   );
10380   return $description;
10381 }
10395 function tripal_core_chado_schema_v1_2_phylonodeprop() {
10396   $description =  array(
10397     'description' => 'TODO: please describe this table!',
10398     'fields' => array(
10399       'phylonodeprop_id' => array(
10400         'description' => 'TODO: please describe this field!',
10401         'type' => 'serial',
10402         'not null' => TRUE,
10403       ),
10404       'phylonode_id' => array(
10405         'description' => 'TODO: please describe this field!',
10406         'type' => 'int',
10407         'not null' => TRUE,
10408       ),
10409       'type_id' => array(
10410         'description' => 'TODO: please describe this field!',
10411         'type' => 'int',
10412         'not null' => TRUE,
10413       ),
10414       'value' => array(
10415         'description' => 'TODO: please describe this field!',
10416         'type' => 'text',
10417         'not null' => TRUE,
10418         'default' => '',
10419       ),
10420       'rank' => array(
10421         'description' => 'TODO: please describe this field!',
10422         'type' => 'int',
10423         'not null' => TRUE,
10424         'default' => 0,
10425       ),
10426     ),
10427     'primary key' => array(
10428       0 => 'phylonodeprop_id',
10429     ),
10430     'unique keys' => array(
10431       'phylonode_id' => array(
10432         0 => 'phylonode_id',
10433         1 => 'type_id',
10434         2 => 'value',
10435         3 => 'rank',
10436       ),
10437     ),
10438     'indexes' => array(
10439       'phylonodeprop_idx1' => array(
10440         0 => 'phylonode_id',
10441       ),
10442       'phylonodeprop_idx2' => array(
10443         0 => 'type_id',
10444       ),
10445     ),
10446     'foreign keys' => array(
10447       'cvterm' => array(
10448         'table' => 'cvterm',
10449         'columns' => array(
10450           'type_id' => 'cvterm_id',
10451         ),
10452       ),
10453       'phylonode' => array(
10454         'table' => 'phylonode',
10455         'columns' => array(
10456           'phylonode_id' => 'phylonode_id',
10457         ),
10458       ),
10459     ),
10460     'table' => 'phylonodeprop',
10461     'referring_tables' => NULL,
10462   );
10463   return $description;
10464 }
10478 function tripal_core_chado_schema_v1_2_phylotree() {
10479   $description =  array(
10480     'description' => 'TODO: please describe this table!',
10481     'fields' => array(
10482       'phylotree_id' => array(
10483         'description' => 'TODO: please describe this field!',
10484         'type' => 'serial',
10485         'not null' => TRUE,
10486       ),
10487       'dbxref_id' => array(
10488         'description' => 'TODO: please describe this field!',
10489         'type' => 'int',
10490         'not null' => TRUE,
10491       ),
10492       'name' => array(
10493         'description' => 'TODO: please describe this field!',
10494         'type' => 'varchar',
10495         'length' => '255',
10496         'not null' => FALSE,
10497       ),
10498       'type_id' => array(
10499         'description' => 'TODO: please describe this field!',
10500         'type' => 'int',
10501         'not null' => FALSE,
10502       ),
10503       'analysis_id' => array(
10504         'description' => 'TODO: please describe this field!',
10505         'type' => 'int',
10506         'not null' => FALSE,
10507       ),
10508       'comment' => array(
10509         'description' => 'TODO: please describe this field!',
10510         'type' => 'text',
10511         'not null' => FALSE,
10512       ),
10513     ),
10514     'primary key' => array(
10515       0 => 'phylotree_id',
10516     ),
10517     'indexes' => array(
10518       'phylotree_idx1' => array(
10519         0 => 'phylotree_id',
10520       ),
10521     ),
10522     'foreign keys' => array(
10523       'cvterm' => array(
10524         'table' => 'cvterm',
10525         'columns' => array(
10526           'type_id' => 'cvterm_id',
10527         ),
10528       ),
10529       'dbxref' => array(
10530         'table' => 'dbxref',
10531         'columns' => array(
10532           'dbxref_id' => 'dbxref_id',
10533         ),
10534       ),
10535       'analysis' => array(
10536         'table' => 'analysis',
10537         'columns' => array(
10538           'analysis_id' => 'analysis_id',
10539         ),
10540       ),
10541     ),
10542     'table' => 'phylotree',
10543     'referring_tables' => array(
10544       0 => 'phylonode',
10545       1 => 'phylonode_relationship',
10546       2 => 'phylotree_pub',
10547     ),
10548   );
10549   return $description;
10550 }
10564 function tripal_core_chado_schema_v1_2_phylotree_pub() {
10565   $description =  array(
10566     'description' => 'TODO: please describe this table!',
10567     'fields' => array(
10568       'phylotree_pub_id' => array(
10569         'description' => 'TODO: please describe this field!',
10570         'type' => 'serial',
10571         'not null' => TRUE,
10572       ),
10573       'phylotree_id' => array(
10574         'description' => 'TODO: please describe this field!',
10575         'type' => 'int',
10576         'not null' => TRUE,
10577       ),
10578       'pub_id' => array(
10579         'description' => 'TODO: please describe this field!',
10580         'type' => 'int',
10581         'not null' => TRUE,
10582       ),
10583     ),
10584     'primary key' => array(
10585       0 => 'phylotree_pub_id',
10586     ),
10587     'unique keys' => array(
10588       'phylotree_id' => array(
10589         0 => 'phylotree_id',
10590         1 => 'pub_id',
10591       ),
10592     ),
10593     'indexes' => array(
10594       'phylotree_pub_idx1' => array(
10595         0 => 'phylotree_id',
10596       ),
10597       'phylotree_pub_idx2' => array(
10598         0 => 'pub_id',
10599       ),
10600     ),
10601     'foreign keys' => array(
10602       'pub' => array(
10603         'table' => 'pub',
10604         'columns' => array(
10605           'pub_id' => 'pub_id',
10606         ),
10607       ),
10608       'phylotree' => array(
10609         'table' => 'phylotree',
10610         'columns' => array(
10611           'phylotree_id' => 'phylotree_id',
10612         ),
10613       ),
10614     ),
10615     'table' => 'phylotree_pub',
10616     'referring_tables' => NULL,
10617   );
10618   return $description;
10619 }
10633 function tripal_core_chado_schema_v1_2_project() {
10634   $description =  array(
10635     'description' => 'TODO: please describe this table!',
10636     'fields' => array(
10637       'project_id' => array(
10638         'description' => 'TODO: please describe this field!',
10639         'type' => 'serial',
10640         'not null' => TRUE,
10641       ),
10642       'name' => array(
10643         'description' => 'TODO: please describe this field!',
10644         'type' => 'varchar',
10645         'length' => '255',
10646         'not null' => TRUE,
10647       ),
10648       'description' => array(
10649         'description' => 'TODO: please describe this field!',
10650         'type' => 'varchar',
10651         'length' => '255',
10652         'not null' => TRUE,
10653       ),
10654     ),
10655     'primary key' => array(
10656       0 => 'project_id',
10657     ),
10658     'unique keys' => array(
10659       'project_c1' => array(
10660         0 => 'name',
10661       ),
10662     ),
10663     'foreign keys' => array(
10664     ),
10665     'table' => 'project',
10666     'referring_tables' => array(
10667       0 => 'assay_project',
10668       1 => 'nd_experiment_project',
10669       2 => 'project_contact',
10670       10 => 'project_pub',
10671       18 => 'project_relationship',
10672       34 => 'projectprop',
10673     ),
10674   );
10675   return $description;
10676 }
10690 function tripal_core_chado_schema_v1_2_project_contact() {
10691   $description =  array(
10692     'description' => 'TODO: please describe this table!',
10693     'fields' => array(
10694       'project_contact_id' => array(
10695         'description' => 'TODO: please describe this field!',
10696         'type' => 'serial',
10697         'not null' => TRUE,
10698       ),
10699       'project_id' => array(
10700         'description' => 'TODO: please describe this field!',
10701         'type' => 'int',
10702         'not null' => TRUE,
10703       ),
10704       'contact_id' => array(
10705         'description' => 'TODO: please describe this field!',
10706         'type' => 'int',
10707         'not null' => TRUE,
10708       ),
10709     ),
10710     'primary key' => array(
10711       0 => 'project_contact_id',
10712     ),
10713     'unique keys' => array(
10714       'project_contact_c1' => array(
10715         0 => 'project_id',
10716         1 => 'contact_id',
10717       ),
10718     ),
10719     'indexes' => array(
10720       'project_contact_idx1' => array(
10721         0 => 'project_id',
10722       ),
10723       'project_contact_idx2' => array(
10724         0 => 'contact_id',
10725       ),
10726     ),
10727     'foreign keys' => array(
10728       'contact' => array(
10729         'table' => 'contact',
10730         'columns' => array(
10731           'contact_id' => 'contact_id',
10732         ),
10733       ),
10734       'project' => array(
10735         'table' => 'project',
10736         'columns' => array(
10737           'project_id' => 'project_id',
10738         ),
10739       ),
10740     ),
10741     'table' => 'project_contact',
10742     'referring_tables' => NULL,
10743   );
10744   return $description;
10745 }
10759 function tripal_core_chado_schema_v1_2_project_pub() {
10760   $description =  array(
10761     'description' => 'TODO: please describe this table!',
10762     'fields' => array(
10763       'project_pub_id' => array(
10764         'description' => 'TODO: please describe this field!',
10765         'type' => 'serial',
10766         'not null' => TRUE,
10767       ),
10768       'project_id' => array(
10769         'description' => 'TODO: please describe this field!',
10770         'type' => 'int',
10771         'not null' => TRUE,
10772       ),
10773       'pub_id' => array(
10774         'description' => 'TODO: please describe this field!',
10775         'type' => 'int',
10776         'not null' => TRUE,
10777       ),
10778     ),
10779     'primary key' => array(
10780       0 => 'project_pub_id',
10781     ),
10782     'unique keys' => array(
10783       'project_pub_c1' => array(
10784         0 => 'project_id',
10785         1 => 'pub_id',
10786       ),
10787     ),
10788     'indexes' => array(
10789       'project_pub_idx1' => array(
10790         0 => 'project_id',
10791       ),
10792       'project_pub_idx2' => array(
10793         0 => 'pub_id',
10794       ),
10795     ),
10796     'foreign keys' => array(
10797       'pub' => array(
10798         'table' => 'pub',
10799         'columns' => array(
10800           'pub_id' => 'pub_id',
10801         ),
10802       ),
10803       'project' => array(
10804         'table' => 'project',
10805         'columns' => array(
10806           'project_id' => 'project_id',
10807         ),
10808       ),
10809     ),
10810     'table' => 'project_pub',
10811     'referring_tables' => NULL,
10812   );
10813   return $description;
10814 }
10828 function tripal_core_chado_schema_v1_2_project_relationship() {
10829   $description =  array(
10830     'description' => 'TODO: please describe this table!',
10831     'fields' => array(
10832       'project_relationship_id' => array(
10833         'description' => 'TODO: please describe this field!',
10834         'type' => 'serial',
10835         'not null' => TRUE,
10836       ),
10837       'subject_project_id' => array(
10838         'description' => 'TODO: please describe this field!',
10839         'type' => 'int',
10840         'not null' => TRUE,
10841       ),
10842       'object_project_id' => array(
10843         'description' => 'TODO: please describe this field!',
10844         'type' => 'int',
10845         'not null' => TRUE,
10846       ),
10847       'type_id' => array(
10848         'description' => 'TODO: please describe this field!',
10849         'type' => 'int',
10850         'not null' => TRUE,
10851       ),
10852     ),
10853     'primary key' => array(
10854       0 => 'project_relationship_id',
10855     ),
10856     'unique keys' => array(
10857       'project_relationship_c1' => array(
10858         0 => 'subject_project_id',
10859         1 => 'object_project_id',
10860         2 => 'type_id',
10861       ),
10862     ),
10863     'foreign keys' => array(
10864       'cvterm' => array(
10865         'table' => 'cvterm',
10866         'columns' => array(
10867           'type_id' => 'cvterm_id',
10868         ),
10869       ),
10870       'project' => array(
10871         'table' => 'project',
10872         'columns' => array(
10873           'subject_project_id' => 'project_id',
10874           'object_project_id' => 'project_id',
10875         ),
10876       ),
10877     ),
10878     'table' => 'project_relationship',
10879     'referring_tables' => NULL,
10880   );
10881   return $description;
10882 }
10896 function tripal_core_chado_schema_v1_2_projectprop() {
10897   $description =  array(
10898     'description' => 'TODO: please describe this table!',
10899     'fields' => array(
10900       'projectprop_id' => array(
10901         'description' => 'TODO: please describe this field!',
10902         'type' => 'serial',
10903         'not null' => TRUE,
10904       ),
10905       'project_id' => array(
10906         'description' => 'TODO: please describe this field!',
10907         'type' => 'int',
10908         'not null' => TRUE,
10909       ),
10910       'type_id' => array(
10911         'description' => 'TODO: please describe this field!',
10912         'type' => 'int',
10913         'not null' => TRUE,
10914       ),
10915       'value' => array(
10916         'description' => 'TODO: please describe this field!',
10917         'type' => 'text',
10918         'not null' => FALSE,
10919       ),
10920       'rank' => array(
10921         'description' => 'TODO: please describe this field!',
10922         'type' => 'int',
10923         'not null' => TRUE,
10924         'default' => 0,
10925       ),
10926     ),
10927     'primary key' => array(
10928       0 => 'projectprop_id',
10929     ),
10930     'unique keys' => array(
10931       'projectprop_c1' => array(
10932         0 => 'project_id',
10933         1 => 'type_id',
10934         2 => 'rank',
10935       ),
10936     ),
10937     'foreign keys' => array(
10938       'cvterm' => array(
10939         'table' => 'cvterm',
10940         'columns' => array(
10941           'type_id' => 'cvterm_id',
10942         ),
10943       ),
10944       'project' => array(
10945         'table' => 'project',
10946         'columns' => array(
10947           'project_id' => 'project_id',
10948         ),
10949       ),
10950     ),
10951     'table' => 'projectprop',
10952     'referring_tables' => NULL,
10953   );
10954   return $description;
10955 }
10969 function tripal_core_chado_schema_v1_2_protocol() {
10970   $description =  array(
10971     'description' => 'TODO: please describe this table!',
10972     'fields' => array(
10973       'protocol_id' => array(
10974         'description' => 'TODO: please describe this field!',
10975         'type' => 'serial',
10976         'not null' => TRUE,
10977       ),
10978       'type_id' => array(
10979         'description' => 'TODO: please describe this field!',
10980         'type' => 'int',
10981         'not null' => TRUE,
10982       ),
10983       'pub_id' => array(
10984         'description' => 'TODO: please describe this field!',
10985         'type' => 'int',
10986         'not null' => FALSE,
10987       ),
10988       'dbxref_id' => array(
10989         'description' => 'TODO: please describe this field!',
10990         'type' => 'int',
10991         'not null' => FALSE,
10992       ),
10993       'name' => array(
10994         'description' => 'TODO: please describe this field!',
10995         'type' => 'text',
10996         'not null' => TRUE,
10997       ),
10998       'uri' => array(
10999         'description' => 'TODO: please describe this field!',
11000         'type' => 'text',
11001         'not null' => FALSE,
11002       ),
11003       'protocoldescription' => array(
11004         'description' => 'TODO: please describe this field!',
11005         'type' => 'text',
11006         'not null' => FALSE,
11007       ),
11008       'hardwaredescription' => array(
11009         'description' => 'TODO: please describe this field!',
11010         'type' => 'text',
11011         'not null' => FALSE,
11012       ),
11013       'softwaredescription' => array(
11014         'description' => 'TODO: please describe this field!',
11015         'type' => 'text',
11016         'not null' => FALSE,
11017       ),
11018     ),
11019     'primary key' => array(
11020       0 => 'protocol_id',
11021     ),
11022     'unique keys' => array(
11023       'protocol_c1' => array(
11024         0 => 'name',
11025       ),
11026     ),
11027     'indexes' => array(
11028       'protocol_idx1' => array(
11029         0 => 'type_id',
11030       ),
11031       'protocol_idx2' => array(
11032         0 => 'pub_id',
11033       ),
11034       'protocol_idx3' => array(
11035         0 => 'dbxref_id',
11036       ),
11037     ),
11038     'foreign keys' => array(
11039       'cvterm' => array(
11040         'table' => 'cvterm',
11041         'columns' => array(
11042           'type_id' => 'cvterm_id',
11043         ),
11044       ),
11045       'dbxref' => array(
11046         'table' => 'dbxref',
11047         'columns' => array(
11048           'dbxref_id' => 'dbxref_id',
11049         ),
11050       ),
11051       'pub' => array(
11052         'table' => 'pub',
11053         'columns' => array(
11054           'pub_id' => 'pub_id',
11055         ),
11056       ),
11057     ),
11058     'table' => 'protocol',
11059     'referring_tables' => array(
11060       0 => 'acquisition',
11061       1 => 'arraydesign',
11062       2 => 'assay',
11063       3 => 'protocolparam',
11064       4 => 'quantification',
11065       5 => 'treatment',
11066     ),
11067   );
11068   return $description;
11069 }
11083 function tripal_core_chado_schema_v1_2_protocolparam() {
11084   $description =  array(
11085     'description' => 'TODO: please describe this table!',
11086     'fields' => array(
11087       'protocolparam_id' => array(
11088         'description' => 'TODO: please describe this field!',
11089         'type' => 'serial',
11090         'not null' => TRUE,
11091       ),
11092       'protocol_id' => array(
11093         'description' => 'TODO: please describe this field!',
11094         'type' => 'int',
11095         'not null' => TRUE,
11096       ),
11097       'name' => array(
11098         'description' => 'TODO: please describe this field!',
11099         'type' => 'text',
11100         'not null' => TRUE,
11101       ),
11102       'datatype_id' => array(
11103         'description' => 'TODO: please describe this field!',
11104         'type' => 'int',
11105         'not null' => FALSE,
11106       ),
11107       'unittype_id' => array(
11108         'description' => 'TODO: please describe this field!',
11109         'type' => 'int',
11110         'not null' => FALSE,
11111       ),
11112       'value' => array(
11113         'description' => 'TODO: please describe this field!',
11114         'type' => 'text',
11115         'not null' => FALSE,
11116       ),
11117       'rank' => array(
11118         'description' => 'TODO: please describe this field!',
11119         'type' => 'int',
11120         'not null' => TRUE,
11121         'default' => 0,
11122       ),
11123     ),
11124     'primary key' => array(
11125       0 => 'protocolparam_id',
11126     ),
11127     'indexes' => array(
11128       'protocolparam_idx1' => array(
11129         0 => 'protocol_id',
11130       ),
11131       'protocolparam_idx2' => array(
11132         0 => 'datatype_id',
11133       ),
11134       'protocolparam_idx3' => array(
11135         0 => 'unittype_id',
11136       ),
11137     ),
11138     'foreign keys' => array(
11139       'cvterm' => array(
11140         'table' => 'cvterm',
11141         'columns' => array(
11142           'datatype_id' => 'cvterm_id',
11143           'unittype_id' => 'cvterm_id',
11144         ),
11145       ),
11146       'protocol' => array(
11147         'table' => 'protocol',
11148         'columns' => array(
11149           'protocol_id' => 'protocol_id',
11150         ),
11151       ),
11152     ),
11153     'table' => 'protocolparam',
11154     'referring_tables' => NULL,
11155   );
11156   return $description;
11157 }
11171 function tripal_core_chado_schema_v1_2_pub() {
11172   $description =  array(
11173     'description' => 'TODO: please describe this table!',
11174     'fields' => array(
11175       'pub_id' => array(
11176         'description' => 'TODO: please describe this field!',
11177         'type' => 'serial',
11178         'not null' => TRUE,
11179       ),
11180       'title' => array(
11181         'description' => 'TODO: please describe this field!',
11182         'type' => 'text',
11183         'not null' => FALSE,
11184       ),
11185       'volumetitle' => array(
11186         'description' => 'TODO: please describe this field!',
11187         'type' => 'text',
11188         'not null' => FALSE,
11189       ),
11190       'volume' => array(
11191         'description' => 'TODO: please describe this field!',
11192         'type' => 'varchar',
11193         'length' => '255',
11194         'not null' => FALSE,
11195       ),
11196       'series_name' => array(
11197         'description' => 'TODO: please describe this field!',
11198         'type' => 'varchar',
11199         'length' => '255',
11200         'not null' => FALSE,
11201       ),
11202       'issue' => array(
11203         'description' => 'TODO: please describe this field!',
11204         'type' => 'varchar',
11205         'length' => '255',
11206         'not null' => FALSE,
11207       ),
11208       'pyear' => array(
11209         'description' => 'TODO: please describe this field!',
11210         'type' => 'varchar',
11211         'length' => '255',
11212         'not null' => FALSE,
11213       ),
11214       'pages' => array(
11215         'description' => 'TODO: please describe this field!',
11216         'type' => 'varchar',
11217         'length' => '255',
11218         'not null' => FALSE,
11219       ),
11220       'miniref' => array(
11221         'description' => 'TODO: please describe this field!',
11222         'type' => 'varchar',
11223         'length' => '255',
11224         'not null' => FALSE,
11225       ),
11226       'uniquename' => array(
11227         'description' => 'TODO: please describe this field!',
11228         'type' => 'text',
11229         'not null' => TRUE,
11230       ),
11231       'type_id' => array(
11232         'description' => 'TODO: please describe this field!',
11233         'type' => 'int',
11234         'not null' => TRUE,
11235       ),
11236       'is_obsolete' => array(
11237         'description' => 'TODO: please describe this field!',
11238         'type' => 'boolean',
11239         'not null' => FALSE,
11240         'default' => 'als',
11241       ),
11242       'publisher' => array(
11243         'description' => 'TODO: please describe this field!',
11244         'type' => 'varchar',
11245         'length' => '255',
11246         'not null' => FALSE,
11247       ),
11248       'pubplace' => array(
11249         'description' => 'TODO: please describe this field!',
11250         'type' => 'varchar',
11251         'length' => '255',
11252         'not null' => FALSE,
11253       ),
11254     ),
11255     'primary key' => array(
11256       0 => 'pub_id',
11257     ),
11258     'unique keys' => array(
11259       'pub_c1' => array(
11260         0 => 'uniquename',
11261       ),
11262     ),
11263     'indexes' => array(
11264       'pub_idx1' => array(
11265         0 => 'type_id',
11266       ),
11267     ),
11268     'foreign keys' => array(
11269       'cvterm' => array(
11270         'table' => 'cvterm',
11271         'columns' => array(
11272           'type_id' => 'cvterm_id',
11273         ),
11274       ),
11275     ),
11276     'table' => 'pub',
11277     'referring_tables' => array(
11278       0 => 'cell_line_cvterm',
11279       1 => 'cell_line_feature',
11280       2 => 'cell_line_library',
11281       3 => 'cell_line_pub',
11282       4 => 'cell_line_synonym',
11283       5 => 'cell_lineprop_pub',
11284       6 => 'expression_pub',
11285       7 => 'feature_cvterm',
11286       8 => 'feature_cvterm_pub',
11287       9 => 'feature_expression',
11288       10 => 'feature_pub',
11289       11 => 'feature_relationship_pub',
11290       12 => 'feature_relationshipprop_pub',
11291       13 => 'feature_synonym',
11292       14 => 'featureloc_pub',
11293       15 => 'featuremap_pub',
11294       16 => 'featureprop_pub',
11295       17 => 'library_cvterm',
11296       18 => 'library_pub',
11297       19 => 'library_synonym',
11298       20 => 'libraryprop_pub',
11299       21 => 'nd_experiment_pub',
11300       22 => 'phendesc',
11301       23 => 'phenotype_comparison',
11302       24 => 'phenotype_comparison_cvterm',
11303       25 => 'phenstatement',
11304       26 => 'phylonode_pub',
11305       27 => 'phylotree_pub',
11306       28 => 'project_pub',
11307       36 => 'protocol',
11308       37 => 'pub_dbxref',
11309       38 => 'pub_relationship',
11310       40 => 'pubauthor',
11311       41 => 'pubprop',
11312       42 => 'stock_cvterm',
11313       43 => 'stock_pub',
11314       44 => 'stock_relationship_cvterm',
11315       52 => 'stock_relationship_pub',
11316       53 => 'stockprop_pub',
11317       54 => 'study',
11318     ),
11319   );
11320   return $description;
11321 }
11335 function tripal_core_chado_schema_v1_2_pub_dbxref() {
11336   $description =  array(
11337     'description' => 'TODO: please describe this table!',
11338     'fields' => array(
11339       'pub_dbxref_id' => array(
11340         'description' => 'TODO: please describe this field!',
11341         'type' => 'serial',
11342         'not null' => TRUE,
11343       ),
11344       'pub_id' => array(
11345         'description' => 'TODO: please describe this field!',
11346         'type' => 'int',
11347         'not null' => TRUE,
11348       ),
11349       'dbxref_id' => array(
11350         'description' => 'TODO: please describe this field!',
11351         'type' => 'int',
11352         'not null' => TRUE,
11353       ),
11354       'is_current' => array(
11355         'description' => 'TODO: please describe this field!',
11356         'type' => 'boolean',
11357         'not null' => TRUE,
11358         'default' => 'ru',
11359       ),
11360     ),
11361     'primary key' => array(
11362       0 => 'pub_dbxref_id',
11363     ),
11364     'unique keys' => array(
11365       'pub_dbxref_c1' => array(
11366         0 => 'pub_id',
11367         1 => 'dbxref_id',
11368       ),
11369     ),
11370     'indexes' => array(
11371       'pub_dbxref_idx1' => array(
11372         0 => 'pub_id',
11373       ),
11374       'pub_dbxref_idx2' => array(
11375         0 => 'dbxref_id',
11376       ),
11377     ),
11378     'foreign keys' => array(
11379       'dbxref' => array(
11380         'table' => 'dbxref',
11381         'columns' => array(
11382           'dbxref_id' => 'dbxref_id',
11383         ),
11384       ),
11385       'pub' => array(
11386         'table' => 'pub',
11387         'columns' => array(
11388           'pub_id' => 'pub_id',
11389         ),
11390       ),
11391     ),
11392     'table' => 'pub_dbxref',
11393     'referring_tables' => NULL,
11394   );
11395   return $description;
11396 }
11410 function tripal_core_chado_schema_v1_2_pub_relationship() {
11411   $description =  array(
11412     'description' => 'TODO: please describe this table!',
11413     'fields' => array(
11414       'pub_relationship_id' => array(
11415         'description' => 'TODO: please describe this field!',
11416         'type' => 'serial',
11417         'not null' => TRUE,
11418       ),
11419       'subject_id' => array(
11420         'description' => 'TODO: please describe this field!',
11421         'type' => 'int',
11422         'not null' => TRUE,
11423       ),
11424       'object_id' => array(
11425         'description' => 'TODO: please describe this field!',
11426         'type' => 'int',
11427         'not null' => TRUE,
11428       ),
11429       'type_id' => array(
11430         'description' => 'TODO: please describe this field!',
11431         'type' => 'int',
11432         'not null' => TRUE,
11433       ),
11434     ),
11435     'primary key' => array(
11436       0 => 'pub_relationship_id',
11437     ),
11438     'unique keys' => array(
11439       'pub_relationship_c1' => array(
11440         0 => 'subject_id',
11441         1 => 'object_id',
11442         2 => 'type_id',
11443       ),
11444     ),
11445     'indexes' => array(
11446       'pub_relationship_idx1' => array(
11447         0 => 'subject_id',
11448       ),
11449       'pub_relationship_idx2' => array(
11450         0 => 'object_id',
11451       ),
11452       'pub_relationship_idx3' => array(
11453         0 => 'type_id',
11454       ),
11455     ),
11456     'foreign keys' => array(
11457       'cvterm' => array(
11458         'table' => 'cvterm',
11459         'columns' => array(
11460           'type_id' => 'cvterm_id',
11461         ),
11462       ),
11463       'pub' => array(
11464         'table' => 'pub',
11465         'columns' => array(
11466           'subject_id' => 'pub_id',
11467           'object_id' => 'pub_id',
11468         ),
11469       ),
11470     ),
11471     'table' => 'pub_relationship',
11472     'referring_tables' => NULL,
11473   );
11474   return $description;
11475 }
11489 function tripal_core_chado_schema_v1_2_pubauthor() {
11490   $description =  array(
11491     'description' => 'TODO: please describe this table!',
11492     'fields' => array(
11493       'pubauthor_id' => array(
11494         'description' => 'TODO: please describe this field!',
11495         'type' => 'serial',
11496         'not null' => TRUE,
11497       ),
11498       'pub_id' => array(
11499         'description' => 'TODO: please describe this field!',
11500         'type' => 'int',
11501         'not null' => TRUE,
11502       ),
11503       'rank' => array(
11504         'description' => 'TODO: please describe this field!',
11505         'type' => 'int',
11506         'not null' => TRUE,
11507       ),
11508       'editor' => array(
11509         'description' => 'TODO: please describe this field!',
11510         'type' => 'boolean',
11511         'not null' => FALSE,
11512         'default' => 'als',
11513       ),
11514       'surname' => array(
11515         'description' => 'TODO: please describe this field!',
11516         'type' => 'varchar',
11517         'length' => '100',
11518         'not null' => TRUE,
11519       ),
11520       'givennames' => array(
11521         'description' => 'TODO: please describe this field!',
11522         'type' => 'varchar',
11523         'length' => '100',
11524         'not null' => FALSE,
11525       ),
11526       'suffix' => array(
11527         'description' => 'TODO: please describe this field!',
11528         'type' => 'varchar',
11529         'length' => '100',
11530         'not null' => FALSE,
11531       ),
11532     ),
11533     'primary key' => array(
11534       0 => 'pubauthor_id',
11535     ),
11536     'unique keys' => array(
11537       'pubauthor_c1' => array(
11538         0 => 'pub_id',
11539         1 => 'rank',
11540       ),
11541     ),
11542     'indexes' => array(
11543       'pubauthor_idx2' => array(
11544         0 => 'pub_id',
11545       ),
11546     ),
11547     'foreign keys' => array(
11548       'pub' => array(
11549         'table' => 'pub',
11550         'columns' => array(
11551           'pub_id' => 'pub_id',
11552         ),
11553       ),
11554     ),
11555     'table' => 'pubauthor',
11556     'referring_tables' => NULL,
11557   );
11558   return $description;
11559 }
11573 function tripal_core_chado_schema_v1_2_pubprop() {
11574   $description =  array(
11575     'description' => 'TODO: please describe this table!',
11576     'fields' => array(
11577       'pubprop_id' => array(
11578         'description' => 'TODO: please describe this field!',
11579         'type' => 'serial',
11580         'not null' => TRUE,
11581       ),
11582       'pub_id' => array(
11583         'description' => 'TODO: please describe this field!',
11584         'type' => 'int',
11585         'not null' => TRUE,
11586       ),
11587       'type_id' => array(
11588         'description' => 'TODO: please describe this field!',
11589         'type' => 'int',
11590         'not null' => TRUE,
11591       ),
11592       'value' => array(
11593         'description' => 'TODO: please describe this field!',
11594         'type' => 'text',
11595         'not null' => TRUE,
11596       ),
11597       'rank' => array(
11598         'description' => 'TODO: please describe this field!',
11599         'type' => 'int',
11600         'not null' => FALSE,
11601       ),
11602     ),
11603     'primary key' => array(
11604       0 => 'pubprop_id',
11605     ),
11606     'unique keys' => array(
11607       'pubprop_c1' => array(
11608         0 => 'pub_id',
11609         1 => 'type_id',
11610         2 => 'rank',
11611       ),
11612     ),
11613     'indexes' => array(
11614       'pubprop_idx1' => array(
11615         0 => 'pub_id',
11616       ),
11617       'pubprop_idx2' => array(
11618         0 => 'type_id',
11619       ),
11620     ),
11621     'foreign keys' => array(
11622       'cvterm' => array(
11623         'table' => 'cvterm',
11624         'columns' => array(
11625           'type_id' => 'cvterm_id',
11626         ),
11627       ),
11628       'pub' => array(
11629         'table' => 'pub',
11630         'columns' => array(
11631           'pub_id' => 'pub_id',
11632         ),
11633       ),
11634     ),
11635     'table' => 'pubprop',
11636     'referring_tables' => NULL,
11637   );
11638   return $description;
11639 }
11653 function tripal_core_chado_schema_v1_2_quantification() {
11654   $description =  array(
11655     'description' => 'TODO: please describe this table!',
11656     'fields' => array(
11657       'quantification_id' => array(
11658         'description' => 'TODO: please describe this field!',
11659         'type' => 'serial',
11660         'not null' => TRUE,
11661       ),
11662       'acquisition_id' => array(
11663         'description' => 'TODO: please describe this field!',
11664         'type' => 'int',
11665         'not null' => TRUE,
11666       ),
11667       'operator_id' => array(
11668         'description' => 'TODO: please describe this field!',
11669         'type' => 'int',
11670         'not null' => FALSE,
11671       ),
11672       'protocol_id' => array(
11673         'description' => 'TODO: please describe this field!',
11674         'type' => 'int',
11675         'not null' => FALSE,
11676       ),
11677       'analysis_id' => array(
11678         'description' => 'TODO: please describe this field!',
11679         'type' => 'int',
11680         'not null' => TRUE,
11681       ),
11682       'quantificationdate' => array(
11683         'description' => 'TODO: please describe this field!',
11684         'type' => 'datetime',
11685         'not null' => FALSE,
11686         'default' => 'ow(',
11687       ),
11688       'name' => array(
11689         'description' => 'TODO: please describe this field!',
11690         'type' => 'text',
11691         'not null' => FALSE,
11692       ),
11693       'uri' => array(
11694         'description' => 'TODO: please describe this field!',
11695         'type' => 'text',
11696         'not null' => FALSE,
11697       ),
11698     ),
11699     'primary key' => array(
11700       0 => 'quantification_id',
11701     ),
11702     'unique keys' => array(
11703       'quantification_c1' => array(
11704         0 => 'name',
11705         1 => 'analysis_id',
11706       ),
11707     ),
11708     'indexes' => array(
11709       'quantification_idx1' => array(
11710         0 => 'acquisition_id',
11711       ),
11712       'quantification_idx2' => array(
11713         0 => 'operator_id',
11714       ),
11715       'quantification_idx3' => array(
11716         0 => 'protocol_id',
11717       ),
11718       'quantification_idx4' => array(
11719         0 => 'analysis_id',
11720       ),
11721     ),
11722     'foreign keys' => array(
11723       'analysis' => array(
11724         'table' => 'analysis',
11725         'columns' => array(
11726           'analysis_id' => 'analysis_id',
11727         ),
11728       ),
11729       'contact' => array(
11730         'table' => 'contact',
11731         'columns' => array(
11732           'operator_id' => 'contact_id',
11733         ),
11734       ),
11735       'protocol' => array(
11736         'table' => 'protocol',
11737         'columns' => array(
11738           'protocol_id' => 'protocol_id',
11739         ),
11740       ),
11741       'acquisition' => array(
11742         'table' => 'acquisition',
11743         'columns' => array(
11744           'acquisition_id' => 'acquisition_id',
11745         ),
11746       ),
11747     ),
11748     'table' => 'quantification',
11749     'referring_tables' => array(
11750       0 => 'elementresult',
11751       1 => 'quantification_relationship',
11752       3 => 'quantificationprop',
11753     ),
11754   );
11755   return $description;
11756 }
11770 function tripal_core_chado_schema_v1_2_quantification_relationship() {
11771   $description =  array(
11772     'description' => 'TODO: please describe this table!',
11773     'fields' => array(
11774       'quantification_relationship_id' => array(
11775         'description' => 'TODO: please describe this field!',
11776         'type' => 'serial',
11777         'not null' => TRUE,
11778       ),
11779       'subject_id' => array(
11780         'description' => 'TODO: please describe this field!',
11781         'type' => 'int',
11782         'not null' => TRUE,
11783       ),
11784       'type_id' => array(
11785         'description' => 'TODO: please describe this field!',
11786         'type' => 'int',
11787         'not null' => TRUE,
11788       ),
11789       'object_id' => array(
11790         'description' => 'TODO: please describe this field!',
11791         'type' => 'int',
11792         'not null' => TRUE,
11793       ),
11794     ),
11795     'primary key' => array(
11796       0 => 'quantification_relationship_id',
11797     ),
11798     'unique keys' => array(
11799       'quantification_relationship_c1' => array(
11800         0 => 'subject_id',
11801         1 => 'object_id',
11802         2 => 'type_id',
11803       ),
11804     ),
11805     'indexes' => array(
11806       'quantification_relationship_idx1' => array(
11807         0 => 'subject_id',
11808       ),
11809       'quantification_relationship_idx2' => array(
11810         0 => 'type_id',
11811       ),
11812       'quantification_relationship_idx3' => array(
11813         0 => 'object_id',
11814       ),
11815     ),
11816     'foreign keys' => array(
11817       'cvterm' => array(
11818         'table' => 'cvterm',
11819         'columns' => array(
11820           'type_id' => 'cvterm_id',
11821         ),
11822       ),
11823       'quantification' => array(
11824         'table' => 'quantification',
11825         'columns' => array(
11826           'subject_id' => 'quantification_id',
11827           'object_id' => 'quantification_id',
11828         ),
11829       ),
11830     ),
11831     'table' => 'quantification_relationship',
11832     'referring_tables' => NULL,
11833   );
11834   return $description;
11835 }
11849 function tripal_core_chado_schema_v1_2_quantificationprop() {
11850   $description =  array(
11851     'description' => 'TODO: please describe this table!',
11852     'fields' => array(
11853       'quantificationprop_id' => array(
11854         'description' => 'TODO: please describe this field!',
11855         'type' => 'serial',
11856         'not null' => TRUE,
11857       ),
11858       'quantification_id' => array(
11859         'description' => 'TODO: please describe this field!',
11860         'type' => 'int',
11861         'not null' => TRUE,
11862       ),
11863       'type_id' => array(
11864         'description' => 'TODO: please describe this field!',
11865         'type' => 'int',
11866         'not null' => TRUE,
11867       ),
11868       'value' => array(
11869         'description' => 'TODO: please describe this field!',
11870         'type' => 'text',
11871         'not null' => FALSE,
11872       ),
11873       'rank' => array(
11874         'description' => 'TODO: please describe this field!',
11875         'type' => 'int',
11876         'not null' => TRUE,
11877         'default' => 0,
11878       ),
11879     ),
11880     'primary key' => array(
11881       0 => 'quantificationprop_id',
11882     ),
11883     'unique keys' => array(
11884       'quantificationprop_c1' => array(
11885         0 => 'quantification_id',
11886         1 => 'type_id',
11887         2 => 'rank',
11888       ),
11889     ),
11890     'indexes' => array(
11891       'quantificationprop_idx1' => array(
11892         0 => 'quantification_id',
11893       ),
11894       'quantificationprop_idx2' => array(
11895         0 => 'type_id',
11896       ),
11897     ),
11898     'foreign keys' => array(
11899       'cvterm' => array(
11900         'table' => 'cvterm',
11901         'columns' => array(
11902           'type_id' => 'cvterm_id',
11903         ),
11904       ),
11905       'quantification' => array(
11906         'table' => 'quantification',
11907         'columns' => array(
11908           'quantification_id' => 'quantification_id',
11909         ),
11910       ),
11911     ),
11912     'table' => 'quantificationprop',
11913     'referring_tables' => NULL,
11914   );
11915   return $description;
11916 }
11930 function tripal_core_chado_schema_v1_2_stock() {
11931   $description =  array(
11932     'description' => 'Any stock can be globally identified by the combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype.',
11933     'fields' => array(
11934       'stock_id' => array(
11935         'description' => 'TODO: please describe this field!',
11936         'type' => 'serial',
11937         'not null' => TRUE,
11938       ),
11939       'dbxref_id' => array(
11940         'description' => 'TODO: please describe this field!',
11941         'type' => 'int',
11942         'not null' => FALSE,
11943       ),
11944       'organism_id' => array(
11945         'description' => 'TODO: please describe this field!',
11946         'type' => 'int',
11947         'not null' => FALSE,
11948       ),
11949       'name' => array(
11950         'description' => 'TODO: please describe this field!',
11951         'type' => 'varchar',
11952         'length' => '255',
11953         'not null' => FALSE,
11954       ),
11955       'uniquename' => array(
11956         'description' => 'TODO: please describe this field!',
11957         'type' => 'text',
11958         'not null' => TRUE,
11959       ),
11960       'description' => array(
11961         'description' => 'TODO: please describe this field!',
11962         'type' => 'text',
11963         'not null' => FALSE,
11964       ),
11965       'type_id' => array(
11966         'description' => 'TODO: please describe this field!',
11967         'type' => 'int',
11968         'not null' => TRUE,
11969       ),
11970       'is_obsolete' => array(
11971         'description' => 'TODO: please describe this field!',
11972         'type' => 'boolean',
11973         'not null' => TRUE,
11974         'default' => 'als',
11975       ),
11976     ),
11977     'primary key' => array(
11978       0 => 'stock_id',
11979     ),
11980     'unique keys' => array(
11981       'stock_c1' => array(
11982         0 => 'organism_id',
11983         1 => 'uniquename',
11984         2 => 'type_id',
11985       ),
11986     ),
11987     'indexes' => array(
11988       'stock_idx1' => array(
11989         0 => 'dbxref_id',
11990       ),
11991       'stock_idx2' => array(
11992         0 => 'organism_id',
11993       ),
11994       'stock_idx3' => array(
11995         0 => 'type_id',
11996       ),
11997       'stock_idx4' => array(
11998         0 => 'uniquename',
11999       ),
12000       'stock_name_ind1' => array(
12001         0 => 'name',
12002       ),
12003     ),
12004     'foreign keys' => array(
12005       'organism' => array(
12006         'table' => 'organism',
12007         'columns' => array(
12008           'organism_id' => 'organism_id',
12009         ),
12010       ),
12011       'cvterm' => array(
12012         'table' => 'cvterm',
12013         'columns' => array(
12014           'type_id' => 'cvterm_id',
12015         ),
12016       ),
12017       'dbxref' => array(
12018         'table' => 'dbxref',
12019         'columns' => array(
12020           'dbxref_id' => 'dbxref_id',
12021         ),
12022       ),
12023     ),
12024     'referring_tables' => array(
12025       0 => 'nd_experiment_stock',
12026       1 => 'stock_cvterm',
12027       2 => 'stock_dbxref',
12028       3 => 'stock_genotype',
12029       4 => 'stock_pub',
12030       5 => 'stock_relationship',
12031       7 => 'stockcollection_stock',
12032       8 => 'stockprop',
12033     ),
12034     'table' => 'stock',
12035   );
12036   return $description;
12037 }
12051 function tripal_core_chado_schema_v1_2_stock_cvterm() {
12052   $description =  array(
12053     'description' => 'TODO: please describe this table!',
12054     'fields' => array(
12055       'stock_cvterm_id' => array(
12056         'description' => 'TODO: please describe this field!',
12057         'type' => 'serial',
12058         'not null' => TRUE,
12059       ),
12060       'stock_id' => array(
12061         'description' => 'TODO: please describe this field!',
12062         'type' => 'int',
12063         'not null' => TRUE,
12064       ),
12065       'cvterm_id' => array(
12066         'description' => 'TODO: please describe this field!',
12067         'type' => 'int',
12068         'not null' => TRUE,
12069       ),
12070       'pub_id' => array(
12071         'description' => 'TODO: please describe this field!',
12072         'type' => 'int',
12073         'not null' => TRUE,
12074       ),
12075       'is_not' => array(
12076         'description' => 'TODO: please describe this field!',
12077         'type' => 'boolean',
12078         'not null' => TRUE,
12079         'default' => 'als',
12080       ),
12081       'rank' => array(
12082         'description' => 'TODO: please describe this field!',
12083         'type' => 'int',
12084         'not null' => TRUE,
12085         'default' => 0,
12086       ),
12087     ),
12088     'primary key' => array(
12089       0 => 'stock_cvterm_id',
12090     ),
12091     'unique keys' => array(
12092       'stock_cvterm_c1' => array(
12093         0 => 'stock_id',
12094         1 => 'cvterm_id',
12095         2 => 'pub_id',
12096         3 => 'rank',
12097       ),
12098     ),
12099     'indexes' => array(
12100       'stock_cvterm_idx1' => array(
12101         0 => 'stock_id',
12102       ),
12103       'stock_cvterm_idx2' => array(
12104         0 => 'cvterm_id',
12105       ),
12106       'stock_cvterm_idx3' => array(
12107         0 => 'pub_id',
12108       ),
12109     ),
12110     'foreign keys' => array(
12111       'cvterm' => array(
12112         'table' => 'cvterm',
12113         'columns' => array(
12114           'cvterm_id' => 'cvterm_id',
12115         ),
12116       ),
12117       'pub' => array(
12118         'table' => 'pub',
12119         'columns' => array(
12120           'pub_id' => 'pub_id',
12121         ),
12122       ),
12123       'stock' => array(
12124         'table' => 'stock',
12125         'columns' => array(
12126           'stock_id' => 'stock_id',
12127         ),
12128       ),
12129     ),
12130     'table' => 'stock_cvterm',
12131     'referring_tables' => array(
12132       0 => 'stock_cvtermprop',
12133     ),
12134   );
12135   return $description;
12136 }
12150 function tripal_core_chado_schema_v1_2_stock_cvtermprop() {
12151   $description =  array(
12152     'description' => 'TODO: please describe this table!',
12153     'fields' => array(
12154       'stock_cvtermprop_id' => array(
12155         'description' => 'TODO: please describe this field!',
12156         'type' => 'serial',
12157         'not null' => TRUE,
12158       ),
12159       'stock_cvterm_id' => array(
12160         'description' => 'TODO: please describe this field!',
12161         'type' => 'int',
12162         'not null' => TRUE,
12163       ),
12164       'type_id' => array(
12165         'description' => 'TODO: please describe this field!',
12166         'type' => 'int',
12167         'not null' => TRUE,
12168       ),
12169       'value' => array(
12170         'description' => 'TODO: please describe this field!',
12171         'type' => 'text',
12172         'not null' => FALSE,
12173       ),
12174       'rank' => array(
12175         'description' => 'TODO: please describe this field!',
12176         'type' => 'int',
12177         'not null' => TRUE,
12178         'default' => 0,
12179       ),
12180     ),
12181     'primary key' => array(
12182       0 => 'stock_cvtermprop_id',
12183     ),
12184     'unique keys' => array(
12185       'stock_cvtermprop_c1' => array(
12186         0 => 'stock_cvterm_id',
12187         1 => 'type_id',
12188         2 => 'rank',
12189       ),
12190     ),
12191     'indexes' => array(
12192       'stock_cvtermprop_idx1' => array(
12193         0 => 'stock_cvterm_id',
12194       ),
12195       'stock_cvtermprop_idx2' => array(
12196         0 => 'type_id',
12197       ),
12198     ),
12199     'foreign keys' => array(
12200       'cvterm' => array(
12201         'table' => 'cvterm',
12202         'columns' => array(
12203           'type_id' => 'cvterm_id',
12204         ),
12205       ),
12206       'stock_cvterm' => array(
12207         'table' => 'stock_cvterm',
12208         'columns' => array(
12209           'stock_cvterm_id' => 'stock_cvterm_id',
12210         ),
12211       ),
12212     ),
12213     'table' => 'stock_cvtermprop',
12214     'referring_tables' => NULL,
12215   );
12216   return $description;
12217 }
12231 function tripal_core_chado_schema_v1_2_stock_dbxref() {
12232   $description =  array(
12233     'description' => 'TODO: please describe this table!',
12234     'fields' => array(
12235       'stock_dbxref_id' => array(
12236         'description' => 'TODO: please describe this field!',
12237         'type' => 'serial',
12238         'not null' => TRUE,
12239       ),
12240       'stock_id' => array(
12241         'description' => 'TODO: please describe this field!',
12242         'type' => 'int',
12243         'not null' => TRUE,
12244       ),
12245       'dbxref_id' => array(
12246         'description' => 'TODO: please describe this field!',
12247         'type' => 'int',
12248         'not null' => TRUE,
12249       ),
12250       'is_current' => array(
12251         'description' => 'TODO: please describe this field!',
12252         'type' => 'boolean',
12253         'not null' => TRUE,
12254         'default' => 'ru',
12255       ),
12256     ),
12257     'primary key' => array(
12258       0 => 'stock_dbxref_id',
12259     ),
12260     'unique keys' => array(
12261       'stock_dbxref_c1' => array(
12262         0 => 'stock_id',
12263         1 => 'dbxref_id',
12264       ),
12265     ),
12266     'indexes' => array(
12267       'stock_dbxref_idx1' => array(
12268         0 => 'stock_id',
12269       ),
12270       'stock_dbxref_idx2' => array(
12271         0 => 'dbxref_id',
12272       ),
12273     ),
12274     'foreign keys' => array(
12275       'dbxref' => array(
12276         'table' => 'dbxref',
12277         'columns' => array(
12278           'dbxref_id' => 'dbxref_id',
12279         ),
12280       ),
12281       'stock' => array(
12282         'table' => 'stock',
12283         'columns' => array(
12284           'stock_id' => 'stock_id',
12285         ),
12286       ),
12287     ),
12288     'table' => 'stock_dbxref',
12289     'referring_tables' => array(
12290       0 => 'stock_dbxrefprop',
12291     ),
12292   );
12293   return $description;
12294 }
12308 function tripal_core_chado_schema_v1_2_stock_dbxrefprop() {
12309   $description =  array(
12310     'description' => 'TODO: please describe this table!',
12311     'fields' => array(
12312       'stock_dbxrefprop_id' => array(
12313         'description' => 'TODO: please describe this field!',
12314         'type' => 'serial',
12315         'not null' => TRUE,
12316       ),
12317       'stock_dbxref_id' => array(
12318         'description' => 'TODO: please describe this field!',
12319         'type' => 'int',
12320         'not null' => TRUE,
12321       ),
12322       'type_id' => array(
12323         'description' => 'TODO: please describe this field!',
12324         'type' => 'int',
12325         'not null' => TRUE,
12326       ),
12327       'value' => array(
12328         'description' => 'TODO: please describe this field!',
12329         'type' => 'text',
12330         'not null' => FALSE,
12331       ),
12332       'rank' => array(
12333         'description' => 'TODO: please describe this field!',
12334         'type' => 'int',
12335         'not null' => TRUE,
12336         'default' => 0,
12337       ),
12338     ),
12339     'primary key' => array(
12340       0 => 'stock_dbxrefprop_id',
12341     ),
12342     'unique keys' => array(
12343       'stock_dbxrefprop_c1' => array(
12344         0 => 'stock_dbxref_id',
12345         1 => 'type_id',
12346         2 => 'rank',
12347       ),
12348     ),
12349     'indexes' => array(
12350       'stock_dbxrefprop_idx1' => array(
12351         0 => 'stock_dbxref_id',
12352       ),
12353       'stock_dbxrefprop_idx2' => array(
12354         0 => 'type_id',
12355       ),
12356     ),
12357     'foreign keys' => array(
12358       'cvterm' => array(
12359         'table' => 'cvterm',
12360         'columns' => array(
12361           'type_id' => 'cvterm_id',
12362         ),
12363       ),
12364       'stock_dbxref' => array(
12365         'table' => 'stock_dbxref',
12366         'columns' => array(
12367           'stock_dbxref_id' => 'stock_dbxref_id',
12368         ),
12369       ),
12370     ),
12371     'table' => 'stock_dbxrefprop',
12372     'referring_tables' => NULL,
12373   );
12374   return $description;
12375 }
12389 function tripal_core_chado_schema_v1_2_stock_genotype() {
12390   $description =  array(
12391     'description' => 'TODO: please describe this table!',
12392     'fields' => array(
12393       'stock_genotype_id' => array(
12394         'description' => 'TODO: please describe this field!',
12395         'type' => 'serial',
12396         'not null' => TRUE,
12397       ),
12398       'stock_id' => array(
12399         'description' => 'TODO: please describe this field!',
12400         'type' => 'int',
12401         'not null' => TRUE,
12402       ),
12403       'genotype_id' => array(
12404         'description' => 'TODO: please describe this field!',
12405         'type' => 'int',
12406         'not null' => TRUE,
12407       ),
12408     ),
12409     'primary key' => array(
12410       0 => 'stock_genotype_id',
12411     ),
12412     'unique keys' => array(
12413       'stock_genotype_c1' => array(
12414         0 => 'stock_id',
12415         1 => 'genotype_id',
12416       ),
12417     ),
12418     'indexes' => array(
12419       'stock_genotype_idx1' => array(
12420         0 => 'stock_id',
12421       ),
12422       'stock_genotype_idx2' => array(
12423         0 => 'genotype_id',
12424       ),
12425     ),
12426     'foreign keys' => array(
12427       'genotype' => array(
12428         'table' => 'genotype',
12429         'columns' => array(
12430           'genotype_id' => 'genotype_id',
12431         ),
12432       ),
12433       'stock' => array(
12434         'table' => 'stock',
12435         'columns' => array(
12436           'stock_id' => 'stock_id',
12437         ),
12438       ),
12439     ),
12440     'table' => 'stock_genotype',
12441     'referring_tables' => NULL,
12442   );
12443   return $description;
12444 }
12458 function tripal_core_chado_schema_v1_2_stock_pub() {
12459   $description =  array(
12460     'description' => 'TODO: please describe this table!',
12461     'fields' => array(
12462       'stock_pub_id' => array(
12463         'description' => 'TODO: please describe this field!',
12464         'type' => 'serial',
12465         'not null' => TRUE,
12466       ),
12467       'stock_id' => array(
12468         'description' => 'TODO: please describe this field!',
12469         'type' => 'int',
12470         'not null' => TRUE,
12471       ),
12472       'pub_id' => array(
12473         'description' => 'TODO: please describe this field!',
12474         'type' => 'int',
12475         'not null' => TRUE,
12476       ),
12477     ),
12478     'primary key' => array(
12479       0 => 'stock_pub_id',
12480     ),
12481     'unique keys' => array(
12482       'stock_pub_c1' => array(
12483         0 => 'stock_id',
12484         1 => 'pub_id',
12485       ),
12486     ),
12487     'indexes' => array(
12488       'stock_pub_idx1' => array(
12489         0 => 'stock_id',
12490       ),
12491       'stock_pub_idx2' => array(
12492         0 => 'pub_id',
12493       ),
12494     ),
12495     'foreign keys' => array(
12496       'pub' => array(
12497         'table' => 'pub',
12498         'columns' => array(
12499           'pub_id' => 'pub_id',
12500         ),
12501       ),
12502       'stock' => array(
12503         'table' => 'stock',
12504         'columns' => array(
12505           'stock_id' => 'stock_id',
12506         ),
12507       ),
12508     ),
12509     'table' => 'stock_pub',
12510     'referring_tables' => NULL,
12511   );
12512   return $description;
12513 }
12527 function tripal_core_chado_schema_v1_2_stock_relationship() {
12528   $description =  array(
12529     'description' => 'TODO: please describe this table!',
12530     'fields' => array(
12531       'stock_relationship_id' => array(
12532         'description' => 'TODO: please describe this field!',
12533         'type' => 'serial',
12534         'not null' => TRUE,
12535       ),
12536       'subject_id' => array(
12537         'description' => 'TODO: please describe this field!',
12538         'type' => 'int',
12539         'not null' => TRUE,
12540       ),
12541       'object_id' => array(
12542         'description' => 'TODO: please describe this field!',
12543         'type' => 'int',
12544         'not null' => TRUE,
12545       ),
12546       'type_id' => array(
12547         'description' => 'TODO: please describe this field!',
12548         'type' => 'int',
12549         'not null' => TRUE,
12550       ),
12551       'value' => array(
12552         'description' => 'TODO: please describe this field!',
12553         'type' => 'text',
12554         'not null' => FALSE,
12555       ),
12556       'rank' => array(
12557         'description' => 'TODO: please describe this field!',
12558         'type' => 'int',
12559         'not null' => TRUE,
12560         'default' => 0,
12561       ),
12562     ),
12563     'primary key' => array(
12564       0 => 'stock_relationship_id',
12565     ),
12566     'unique keys' => array(
12567       'stock_relationship_c1' => array(
12568         0 => 'subject_id',
12569         1 => 'object_id',
12570         2 => 'type_id',
12571         3 => 'rank',
12572       ),
12573     ),
12574     'indexes' => array(
12575       'stock_relationship_idx1' => array(
12576         0 => 'subject_id',
12577       ),
12578       'stock_relationship_idx2' => array(
12579         0 => 'object_id',
12580       ),
12581       'stock_relationship_idx3' => array(
12582         0 => 'type_id',
12583       ),
12584     ),
12585     'foreign keys' => array(
12586       'cvterm' => array(
12587         'table' => 'cvterm',
12588         'columns' => array(
12589           'type_id' => 'cvterm_id',
12590         ),
12591       ),
12592       'stock' => array(
12593         'table' => 'stock',
12594         'columns' => array(
12595           'subject_id' => 'stock_id',
12596           'object_id' => 'stock_id',
12597         ),
12598       ),
12599     ),
12600     'table' => 'stock_relationship',
12601     'referring_tables' => array(
12602       0 => 'stock_relationship_cvterm',
12603       8 => 'stock_relationship_pub',
12604     ),
12605   );
12606   return $description;
12607 }
12621 function tripal_core_chado_schema_v1_2_stock_relationship_cvterm() {
12622   $description =  array(
12623     'description' => 'TODO: please describe this table!',
12624     'fields' => array(
12625       'stock_relationship_cvterm_id' => array(
12626         'description' => 'TODO: please describe this field!',
12627         'type' => 'serial',
12628         'not null' => TRUE,
12629       ),
12630       'stock_relationship_id' => array(
12631         'description' => 'TODO: please describe this field!',
12632         'type' => 'int',
12633         'not null' => TRUE,
12634       ),
12635       'cvterm_id' => array(
12636         'description' => 'TODO: please describe this field!',
12637         'type' => 'int',
12638         'not null' => TRUE,
12639       ),
12640       'pub_id' => array(
12641         'description' => 'TODO: please describe this field!',
12642         'type' => 'int',
12643         'not null' => FALSE,
12644       ),
12645     ),
12646     'primary key' => array(
12647       0 => 'stock_relationship_cvterm_id',
12648     ),
12649     'foreign keys' => array(
12650       'cvterm' => array(
12651         'table' => 'cvterm',
12652         'columns' => array(
12653           'cvterm_id' => 'cvterm_id',
12654         ),
12655       ),
12656       'pub' => array(
12657         'table' => 'pub',
12658         'columns' => array(
12659           'pub_id' => 'pub_id',
12660         ),
12661       ),
12662       'stock_relationship' => array(
12663         'table' => 'stock_relationship',
12664         'columns' => array(
12665           'stock_relationship_id' => 'stock_relationship_id',
12666         ),
12667       ),
12668     ),
12669     'table' => 'stock_relationship_cvterm',
12670     'referring_tables' => NULL,
12671   );
12672   return $description;
12673 }
12687 function tripal_core_chado_schema_v1_2_stock_relationship_pub() {
12688   $description =  array(
12689     'description' => 'TODO: please describe this table!',
12690     'fields' => array(
12691       'stock_relationship_pub_id' => array(
12692         'description' => 'TODO: please describe this field!',
12693         'type' => 'serial',
12694         'not null' => TRUE,
12695       ),
12696       'stock_relationship_id' => array(
12697         'description' => 'TODO: please describe this field!',
12698         'type' => 'int',
12699         'not null' => TRUE,
12700       ),
12701       'pub_id' => array(
12702         'description' => 'TODO: please describe this field!',
12703         'type' => 'int',
12704         'not null' => TRUE,
12705       ),
12706     ),
12707     'primary key' => array(
12708       0 => 'stock_relationship_pub_id',
12709     ),
12710     'unique keys' => array(
12711       'stock_relationship_pub_c1' => array(
12712         0 => 'stock_relationship_id',
12713         1 => 'pub_id',
12714       ),
12715     ),
12716     'indexes' => array(
12717       'stock_relationship_pub_idx1' => array(
12718         0 => 'stock_relationship_id',
12719       ),
12720       'stock_relationship_pub_idx2' => array(
12721         0 => 'pub_id',
12722       ),
12723     ),
12724     'foreign keys' => array(
12725       'pub' => array(
12726         'table' => 'pub',
12727         'columns' => array(
12728           'pub_id' => 'pub_id',
12729         ),
12730       ),
12731       'stock_relationship' => array(
12732         'table' => 'stock_relationship',
12733         'columns' => array(
12734           'stock_relationship_id' => 'stock_relationship_id',
12735         ),
12736       ),
12737     ),
12738     'table' => 'stock_relationship_pub',
12739     'referring_tables' => NULL,
12740   );
12741   return $description;
12742 }
12756 function tripal_core_chado_schema_v1_2_stockcollection() {
12757   $description =  array(
12758     'description' => 'TODO: please describe this table!',
12759     'fields' => array(
12760       'stockcollection_id' => array(
12761         'description' => 'TODO: please describe this field!',
12762         'type' => 'serial',
12763         'not null' => TRUE,
12764       ),
12765       'type_id' => array(
12766         'description' => 'TODO: please describe this field!',
12767         'type' => 'int',
12768         'not null' => TRUE,
12769       ),
12770       'contact_id' => array(
12771         'description' => 'TODO: please describe this field!',
12772         'type' => 'int',
12773         'not null' => FALSE,
12774       ),
12775       'name' => array(
12776         'description' => 'TODO: please describe this field!',
12777         'type' => 'varchar',
12778         'length' => '255',
12779         'not null' => FALSE,
12780       ),
12781       'uniquename' => array(
12782         'description' => 'TODO: please describe this field!',
12783         'type' => 'text',
12784         'not null' => TRUE,
12785       ),
12786     ),
12787     'primary key' => array(
12788       0 => 'stockcollection_id',
12789     ),
12790     'unique keys' => array(
12791       'stockcollection_c1' => array(
12792         0 => 'uniquename',
12793         1 => 'type_id',
12794       ),
12795     ),
12796     'indexes' => array(
12797       'stockcollection_idx1' => array(
12798         0 => 'contact_id',
12799       ),
12800       'stockcollection_idx2' => array(
12801         0 => 'type_id',
12802       ),
12803       'stockcollection_idx3' => array(
12804         0 => 'uniquename',
12805       ),
12806       'stockcollection_name_ind1' => array(
12807         0 => 'name',
12808       ),
12809     ),
12810     'foreign keys' => array(
12811       'cvterm' => array(
12812         'table' => 'cvterm',
12813         'columns' => array(
12814           'type_id' => 'cvterm_id',
12815         ),
12816       ),
12817       'contact' => array(
12818         'table' => 'contact',
12819         'columns' => array(
12820           'contact_id' => 'contact_id',
12821         ),
12822       ),
12823     ),
12824     'table' => 'stockcollection',
12825     'referring_tables' => array(
12826       0 => 'stockcollection_stock',
12827       1 => 'stockcollectionprop',
12828     ),
12829   );
12830   return $description;
12831 }
12845 function tripal_core_chado_schema_v1_2_stockcollection_stock() {
12846   $description =  array(
12847     'description' => 'TODO: please describe this table!',
12848     'fields' => array(
12849       'stockcollection_stock_id' => array(
12850         'description' => 'TODO: please describe this field!',
12851         'type' => 'serial',
12852         'not null' => TRUE,
12853       ),
12854       'stockcollection_id' => array(
12855         'description' => 'TODO: please describe this field!',
12856         'type' => 'int',
12857         'not null' => TRUE,
12858       ),
12859       'stock_id' => array(
12860         'description' => 'TODO: please describe this field!',
12861         'type' => 'int',
12862         'not null' => TRUE,
12863       ),
12864     ),
12865     'primary key' => array(
12866       0 => 'stockcollection_stock_id',
12867     ),
12868     'unique keys' => array(
12869       'stockcollection_stock_c1' => array(
12870         0 => 'stockcollection_id',
12871         1 => 'stock_id',
12872       ),
12873     ),
12874     'indexes' => array(
12875       'stockcollection_stock_idx1' => array(
12876         0 => 'stockcollection_id',
12877       ),
12878       'stockcollection_stock_idx2' => array(
12879         0 => 'stock_id',
12880       ),
12881     ),
12882     'foreign keys' => array(
12883       'stock' => array(
12884         'table' => 'stock',
12885         'columns' => array(
12886           'stock_id' => 'stock_id',
12887         ),
12888       ),
12889       'stockcollection' => array(
12890         'table' => 'stockcollection',
12891         'columns' => array(
12892           'stockcollection_id' => 'stockcollection_id',
12893         ),
12894       ),
12895     ),
12896     'table' => 'stockcollection_stock',
12897     'referring_tables' => NULL,
12898   );
12899   return $description;
12900 }
12914 function tripal_core_chado_schema_v1_2_stockcollectionprop() {
12915   $description =  array(
12916     'description' => 'TODO: please describe this table!',
12917     'fields' => array(
12918       'stockcollectionprop_id' => array(
12919         'description' => 'TODO: please describe this field!',
12920         'type' => 'serial',
12921         'not null' => TRUE,
12922       ),
12923       'stockcollection_id' => array(
12924         'description' => 'TODO: please describe this field!',
12925         'type' => 'int',
12926         'not null' => TRUE,
12927       ),
12928       'type_id' => array(
12929         'description' => 'TODO: please describe this field!',
12930         'type' => 'int',
12931         'not null' => TRUE,
12932       ),
12933       'value' => array(
12934         'description' => 'TODO: please describe this field!',
12935         'type' => 'text',
12936         'not null' => FALSE,
12937       ),
12938       'rank' => array(
12939         'description' => 'TODO: please describe this field!',
12940         'type' => 'int',
12941         'not null' => TRUE,
12942         'default' => 0,
12943       ),
12944     ),
12945     'primary key' => array(
12946       0 => 'stockcollectionprop_id',
12947     ),
12948     'unique keys' => array(
12949       'stockcollectionprop_c1' => array(
12950         0 => 'stockcollection_id',
12951         1 => 'type_id',
12952         2 => 'rank',
12953       ),
12954     ),
12955     'indexes' => array(
12956       'stockcollectionprop_idx1' => array(
12957         0 => 'stockcollection_id',
12958       ),
12959       'stockcollectionprop_idx2' => array(
12960         0 => 'type_id',
12961       ),
12962     ),
12963     'foreign keys' => array(
12964       'cvterm' => array(
12965         'table' => 'cvterm',
12966         'columns' => array(
12967           'type_id' => 'cvterm_id',
12968         ),
12969       ),
12970       'stockcollection' => array(
12971         'table' => 'stockcollection',
12972         'columns' => array(
12973           'stockcollection_id' => 'stockcollection_id',
12974         ),
12975       ),
12976     ),
12977     'table' => 'stockcollectionprop',
12978     'referring_tables' => NULL,
12979   );
12980   return $description;
12981 }
12995 function tripal_core_chado_schema_v1_2_stockprop() {
12996   $description =  array(
12997     'description' => 'TODO: please describe this table!',
12998     'fields' => array(
12999       'stockprop_id' => array(
13000         'description' => 'TODO: please describe this field!',
13001         'type' => 'serial',
13002         'not null' => TRUE,
13003       ),
13004       'stock_id' => array(
13005         'description' => 'TODO: please describe this field!',
13006         'type' => 'int',
13007         'not null' => TRUE,
13008       ),
13009       'type_id' => array(
13010         'description' => 'TODO: please describe this field!',
13011         'type' => 'int',
13012         'not null' => TRUE,
13013       ),
13014       'value' => array(
13015         'description' => 'TODO: please describe this field!',
13016         'type' => 'text',
13017         'not null' => FALSE,
13018       ),
13019       'rank' => array(
13020         'description' => 'TODO: please describe this field!',
13021         'type' => 'int',
13022         'not null' => TRUE,
13023         'default' => 0,
13024       ),
13025     ),
13026     'primary key' => array(
13027       0 => 'stockprop_id',
13028     ),
13029     'unique keys' => array(
13030       'stockprop_c1' => array(
13031         0 => 'stock_id',
13032         1 => 'type_id',
13033         2 => 'rank',
13034       ),
13035     ),
13036     'indexes' => array(
13037       'stockprop_idx1' => array(
13038         0 => 'stock_id',
13039       ),
13040       'stockprop_idx2' => array(
13041         0 => 'type_id',
13042       ),
13043     ),
13044     'foreign keys' => array(
13045       'cvterm' => array(
13046         'table' => 'cvterm',
13047         'columns' => array(
13048           'type_id' => 'cvterm_id',
13049         ),
13050       ),
13051       'stock' => array(
13052         'table' => 'stock',
13053         'columns' => array(
13054           'stock_id' => 'stock_id',
13055         ),
13056       ),
13057     ),
13058     'table' => 'stockprop',
13059     'referring_tables' => array(
13060       0 => 'stockprop_pub',
13061     ),
13062   );
13063   return $description;
13064 }
13078 function tripal_core_chado_schema_v1_2_stockprop_pub() {
13079   $description =  array(
13080     'description' => 'TODO: please describe this table!',
13081     'fields' => array(
13082       'stockprop_pub_id' => array(
13083         'description' => 'TODO: please describe this field!',
13084         'type' => 'serial',
13085         'not null' => TRUE,
13086       ),
13087       'stockprop_id' => array(
13088         'description' => 'TODO: please describe this field!',
13089         'type' => 'int',
13090         'not null' => TRUE,
13091       ),
13092       'pub_id' => array(
13093         'description' => 'TODO: please describe this field!',
13094         'type' => 'int',
13095         'not null' => TRUE,
13096       ),
13097     ),
13098     'primary key' => array(
13099       0 => 'stockprop_pub_id',
13100     ),
13101     'unique keys' => array(
13102       'stockprop_pub_c1' => array(
13103         0 => 'stockprop_id',
13104         1 => 'pub_id',
13105       ),
13106     ),
13107     'indexes' => array(
13108       'stockprop_pub_idx1' => array(
13109         0 => 'stockprop_id',
13110       ),
13111       'stockprop_pub_idx2' => array(
13112         0 => 'pub_id',
13113       ),
13114     ),
13115     'foreign keys' => array(
13116       'pub' => array(
13117         'table' => 'pub',
13118         'columns' => array(
13119           'pub_id' => 'pub_id',
13120         ),
13121       ),
13122       'stockprop' => array(
13123         'table' => 'stockprop',
13124         'columns' => array(
13125           'stockprop_id' => 'stockprop_id',
13126         ),
13127       ),
13128     ),
13129     'table' => 'stockprop_pub',
13130     'referring_tables' => NULL,
13131   );
13132   return $description;
13133 }
13147 function tripal_core_chado_schema_v1_2_study() {
13148   $description =  array(
13149     'description' => 'TODO: please describe this table!',
13150     'fields' => array(
13151       'study_id' => array(
13152         'description' => 'TODO: please describe this field!',
13153         'type' => 'serial',
13154         'not null' => TRUE,
13155       ),
13156       'contact_id' => array(
13157         'description' => 'TODO: please describe this field!',
13158         'type' => 'int',
13159         'not null' => TRUE,
13160       ),
13161       'pub_id' => array(
13162         'description' => 'TODO: please describe this field!',
13163         'type' => 'int',
13164         'not null' => FALSE,
13165       ),
13166       'dbxref_id' => array(
13167         'description' => 'TODO: please describe this field!',
13168         'type' => 'int',
13169         'not null' => FALSE,
13170       ),
13171       'name' => array(
13172         'description' => 'TODO: please describe this field!',
13173         'type' => 'text',
13174         'not null' => TRUE,
13175       ),
13176       'description' => array(
13177         'description' => 'TODO: please describe this field!',
13178         'type' => 'text',
13179         'not null' => FALSE,
13180       ),
13181     ),
13182     'primary key' => array(
13183       0 => 'study_id',
13184     ),
13185     'unique keys' => array(
13186       'study_c1' => array(
13187         0 => 'name',
13188       ),
13189     ),
13190     'indexes' => array(
13191       'study_idx1' => array(
13192         0 => 'contact_id',
13193       ),
13194       'study_idx2' => array(
13195         0 => 'pub_id',
13196       ),
13197       'study_idx3' => array(
13198         0 => 'dbxref_id',
13199       ),
13200     ),
13201     'foreign keys' => array(
13202       'dbxref' => array(
13203         'table' => 'dbxref',
13204         'columns' => array(
13205           'dbxref_id' => 'dbxref_id',
13206         ),
13207       ),
13208       'pub' => array(
13209         'table' => 'pub',
13210         'columns' => array(
13211           'pub_id' => 'pub_id',
13212         ),
13213       ),
13214       'contact' => array(
13215         'table' => 'contact',
13216         'columns' => array(
13217           'contact_id' => 'contact_id',
13218         ),
13219       ),
13220     ),
13221     'table' => 'study',
13222     'referring_tables' => array(
13223       0 => 'study_assay',
13224       1 => 'studydesign',
13225       2 => 'studyprop',
13226     ),
13227   );
13228   return $description;
13229 }
13243 function tripal_core_chado_schema_v1_2_study_assay() {
13244   $description =  array(
13245     'description' => 'TODO: please describe this table!',
13246     'fields' => array(
13247       'study_assay_id' => array(
13248         'description' => 'TODO: please describe this field!',
13249         'type' => 'serial',
13250         'not null' => TRUE,
13251       ),
13252       'study_id' => array(
13253         'description' => 'TODO: please describe this field!',
13254         'type' => 'int',
13255         'not null' => TRUE,
13256       ),
13257       'assay_id' => array(
13258         'description' => 'TODO: please describe this field!',
13259         'type' => 'int',
13260         'not null' => TRUE,
13261       ),
13262     ),
13263     'primary key' => array(
13264       0 => 'study_assay_id',
13265     ),
13266     'unique keys' => array(
13267       'study_assay_c1' => array(
13268         0 => 'study_id',
13269         1 => 'assay_id',
13270       ),
13271     ),
13272     'indexes' => array(
13273       'study_assay_idx1' => array(
13274         0 => 'study_id',
13275       ),
13276       'study_assay_idx2' => array(
13277         0 => 'assay_id',
13278       ),
13279     ),
13280     'foreign keys' => array(
13281       'assay' => array(
13282         'table' => 'assay',
13283         'columns' => array(
13284           'assay_id' => 'assay_id',
13285         ),
13286       ),
13287       'study' => array(
13288         'table' => 'study',
13289         'columns' => array(
13290           'study_id' => 'study_id',
13291         ),
13292       ),
13293     ),
13294     'table' => 'study_assay',
13295     'referring_tables' => NULL,
13296   );
13297   return $description;
13298 }
13312 function tripal_core_chado_schema_v1_2_studydesign() {
13313   $description =  array(
13314     'description' => 'TODO: please describe this table!',
13315     'fields' => array(
13316       'studydesign_id' => array(
13317         'description' => 'TODO: please describe this field!',
13318         'type' => 'serial',
13319         'not null' => TRUE,
13320       ),
13321       'study_id' => array(
13322         'description' => 'TODO: please describe this field!',
13323         'type' => 'int',
13324         'not null' => TRUE,
13325       ),
13326       'description' => array(
13327         'description' => 'TODO: please describe this field!',
13328         'type' => 'text',
13329         'not null' => FALSE,
13330       ),
13331     ),
13332     'primary key' => array(
13333       0 => 'studydesign_id',
13334     ),
13335     'indexes' => array(
13336       'studydesign_idx1' => array(
13337         0 => 'study_id',
13338       ),
13339     ),
13340     'foreign keys' => array(
13341       'study' => array(
13342         'table' => 'study',
13343         'columns' => array(
13344           'study_id' => 'study_id',
13345         ),
13346       ),
13347     ),
13348     'table' => 'studydesign',
13349     'referring_tables' => array(
13350       0 => 'studydesignprop',
13351       1 => 'studyfactor',
13352     ),
13353   );
13354   return $description;
13355 }
13369 function tripal_core_chado_schema_v1_2_studydesignprop() {
13370   $description =  array(
13371     'description' => 'TODO: please describe this table!',
13372     'fields' => array(
13373       'studydesignprop_id' => array(
13374         'description' => 'TODO: please describe this field!',
13375         'type' => 'serial',
13376         'not null' => TRUE,
13377       ),
13378       'studydesign_id' => array(
13379         'description' => 'TODO: please describe this field!',
13380         'type' => 'int',
13381         'not null' => TRUE,
13382       ),
13383       'type_id' => array(
13384         'description' => 'TODO: please describe this field!',
13385         'type' => 'int',
13386         'not null' => TRUE,
13387       ),
13388       'value' => array(
13389         'description' => 'TODO: please describe this field!',
13390         'type' => 'text',
13391         'not null' => FALSE,
13392       ),
13393       'rank' => array(
13394         'description' => 'TODO: please describe this field!',
13395         'type' => 'int',
13396         'not null' => TRUE,
13397         'default' => 0,
13398       ),
13399     ),
13400     'primary key' => array(
13401       0 => 'studydesignprop_id',
13402     ),
13403     'unique keys' => array(
13404       'studydesignprop_c1' => array(
13405         0 => 'studydesign_id',
13406         1 => 'type_id',
13407         2 => 'rank',
13408       ),
13409     ),
13410     'indexes' => array(
13411       'studydesignprop_idx1' => array(
13412         0 => 'studydesign_id',
13413       ),
13414       'studydesignprop_idx2' => array(
13415         0 => 'type_id',
13416       ),
13417     ),
13418     'foreign keys' => array(
13419       'cvterm' => array(
13420         'table' => 'cvterm',
13421         'columns' => array(
13422           'type_id' => 'cvterm_id',
13423         ),
13424       ),
13425       'studydesign' => array(
13426         'table' => 'studydesign',
13427         'columns' => array(
13428           'studydesign_id' => 'studydesign_id',
13429         ),
13430       ),
13431     ),
13432     'table' => 'studydesignprop',
13433     'referring_tables' => NULL,
13434   );
13435   return $description;
13436 }
13450 function tripal_core_chado_schema_v1_2_studyfactor() {
13451   $description =  array(
13452     'description' => 'TODO: please describe this table!',
13453     'fields' => array(
13454       'studyfactor_id' => array(
13455         'description' => 'TODO: please describe this field!',
13456         'type' => 'serial',
13457         'not null' => TRUE,
13458       ),
13459       'studydesign_id' => array(
13460         'description' => 'TODO: please describe this field!',
13461         'type' => 'int',
13462         'not null' => TRUE,
13463       ),
13464       'type_id' => array(
13465         'description' => 'TODO: please describe this field!',
13466         'type' => 'int',
13467         'not null' => FALSE,
13468       ),
13469       'name' => array(
13470         'description' => 'TODO: please describe this field!',
13471         'type' => 'text',
13472         'not null' => TRUE,
13473       ),
13474       'description' => array(
13475         'description' => 'TODO: please describe this field!',
13476         'type' => 'text',
13477         'not null' => FALSE,
13478       ),
13479     ),
13480     'primary key' => array(
13481       0 => 'studyfactor_id',
13482     ),
13483     'indexes' => array(
13484       'studyfactor_idx1' => array(
13485         0 => 'studydesign_id',
13486       ),
13487       'studyfactor_idx2' => array(
13488         0 => 'type_id',
13489       ),
13490     ),
13491     'foreign keys' => array(
13492       'cvterm' => array(
13493         'table' => 'cvterm',
13494         'columns' => array(
13495           'type_id' => 'cvterm_id',
13496         ),
13497       ),
13498       'studydesign' => array(
13499         'table' => 'studydesign',
13500         'columns' => array(
13501           'studydesign_id' => 'studydesign_id',
13502         ),
13503       ),
13504     ),
13505     'table' => 'studyfactor',
13506     'referring_tables' => array(
13507       0 => 'studyfactorvalue',
13508     ),
13509   );
13510   return $description;
13511 }
13525 function tripal_core_chado_schema_v1_2_studyfactorvalue() {
13526   $description =  array(
13527     'description' => 'TODO: please describe this table!',
13528     'fields' => array(
13529       'studyfactorvalue_id' => array(
13530         'description' => 'TODO: please describe this field!',
13531         'type' => 'serial',
13532         'not null' => TRUE,
13533       ),
13534       'studyfactor_id' => array(
13535         'description' => 'TODO: please describe this field!',
13536         'type' => 'int',
13537         'not null' => TRUE,
13538       ),
13539       'assay_id' => array(
13540         'description' => 'TODO: please describe this field!',
13541         'type' => 'int',
13542         'not null' => TRUE,
13543       ),
13544       'factorvalue' => array(
13545         'description' => 'TODO: please describe this field!',
13546         'type' => 'text',
13547         'not null' => FALSE,
13548       ),
13549       'name' => array(
13550         'description' => 'TODO: please describe this field!',
13551         'type' => 'text',
13552         'not null' => FALSE,
13553       ),
13554       'rank' => array(
13555         'description' => 'TODO: please describe this field!',
13556         'type' => 'int',
13557         'not null' => TRUE,
13558         'default' => 0,
13559       ),
13560     ),
13561     'primary key' => array(
13562       0 => 'studyfactorvalue_id',
13563     ),
13564     'indexes' => array(
13565       'studyfactorvalue_idx1' => array(
13566         0 => 'studyfactor_id',
13567       ),
13568       'studyfactorvalue_idx2' => array(
13569         0 => 'assay_id',
13570       ),
13571     ),
13572     'foreign keys' => array(
13573       'assay' => array(
13574         'table' => 'assay',
13575         'columns' => array(
13576           'assay_id' => 'assay_id',
13577         ),
13578       ),
13579       'studyfactor' => array(
13580         'table' => 'studyfactor',
13581         'columns' => array(
13582           'studyfactor_id' => 'studyfactor_id',
13583         ),
13584       ),
13585     ),
13586     'table' => 'studyfactorvalue',
13587     'referring_tables' => NULL,
13588   );
13589   return $description;
13590 }
13604 function tripal_core_chado_schema_v1_2_studyprop() {
13605   $description =  array(
13606     'description' => 'TODO: please describe this table!',
13607     'fields' => array(
13608       'studyprop_id' => array(
13609         'description' => 'TODO: please describe this field!',
13610         'type' => 'serial',
13611         'not null' => TRUE,
13612       ),
13613       'study_id' => array(
13614         'description' => 'TODO: please describe this field!',
13615         'type' => 'int',
13616         'not null' => TRUE,
13617       ),
13618       'type_id' => array(
13619         'description' => 'TODO: please describe this field!',
13620         'type' => 'int',
13621         'not null' => TRUE,
13622       ),
13623       'value' => array(
13624         'description' => 'TODO: please describe this field!',
13625         'type' => 'text',
13626         'not null' => FALSE,
13627       ),
13628       'rank' => array(
13629         'description' => 'TODO: please describe this field!',
13630         'type' => 'int',
13631         'not null' => TRUE,
13632         'default' => 0,
13633       ),
13634     ),
13635     'primary key' => array(
13636       0 => 'studyprop_id',
13637     ),
13638     'unique keys' => array(
13639       'study_id' => array(
13640         0 => 'study_id',
13641         1 => 'type_id',
13642         2 => 'rank',
13643       ),
13644     ),
13645     'indexes' => array(
13646       'studyprop_idx1' => array(
13647         0 => 'study_id',
13648       ),
13649       'studyprop_idx2' => array(
13650         0 => 'type_id',
13651       ),
13652     ),
13653     'foreign keys' => array(
13654       'cvterm' => array(
13655         'table' => 'cvterm',
13656         'columns' => array(
13657           'type_id' => 'cvterm_id',
13658         ),
13659       ),
13660       'study' => array(
13661         'table' => 'study',
13662         'columns' => array(
13663           'study_id' => 'study_id',
13664         ),
13665       ),
13666     ),
13667     'table' => 'studyprop',
13668     'referring_tables' => array(
13669       0 => 'studyprop_feature',
13670     ),
13671   );
13672   return $description;
13673 }
13687 function tripal_core_chado_schema_v1_2_studyprop_feature() {
13688   $description =  array(
13689     'description' => 'TODO: please describe this table!',
13690     'fields' => array(
13691       'studyprop_feature_id' => array(
13692         'description' => 'TODO: please describe this field!',
13693         'type' => 'serial',
13694         'not null' => TRUE,
13695       ),
13696       'studyprop_id' => array(
13697         'description' => 'TODO: please describe this field!',
13698         'type' => 'int',
13699         'not null' => TRUE,
13700       ),
13701       'feature_id' => array(
13702         'description' => 'TODO: please describe this field!',
13703         'type' => 'int',
13704         'not null' => TRUE,
13705       ),
13706       'type_id' => array(
13707         'description' => 'TODO: please describe this field!',
13708         'type' => 'int',
13709         'not null' => FALSE,
13710       ),
13711     ),
13712     'primary key' => array(
13713       0 => 'studyprop_feature_id',
13714     ),
13715     'unique keys' => array(
13716       'studyprop_id' => array(
13717         0 => 'studyprop_id',
13718         1 => 'feature_id',
13719       ),
13720     ),
13721     'indexes' => array(
13722       'studyprop_feature_idx1' => array(
13723         0 => 'studyprop_id',
13724       ),
13725       'studyprop_feature_idx2' => array(
13726         0 => 'feature_id',
13727       ),
13728     ),
13729     'foreign keys' => array(
13730       'cvterm' => array(
13731         'table' => 'cvterm',
13732         'columns' => array(
13733           'type_id' => 'cvterm_id',
13734         ),
13735       ),
13736       'feature' => array(
13737         'table' => 'feature',
13738         'columns' => array(
13739           'feature_id' => 'feature_id',
13740         ),
13741       ),
13742       'studyprop' => array(
13743         'table' => 'studyprop',
13744         'columns' => array(
13745           'studyprop_id' => 'studyprop_id',
13746         ),
13747       ),
13748     ),
13749     'table' => 'studyprop_feature',
13750     'referring_tables' => NULL,
13751   );
13752   return $description;
13753 }
13767 function tripal_core_chado_schema_v1_2_synonym() {
13768   $description =  array(
13769     'description' => 'TODO: please describe this table!',
13770     'fields' => array(
13771       'synonym_id' => array(
13772         'description' => 'TODO: please describe this field!',
13773         'type' => 'serial',
13774         'not null' => TRUE,
13775       ),
13776       'name' => array(
13777         'description' => 'TODO: please describe this field!',
13778         'type' => 'varchar',
13779         'length' => '255',
13780         'not null' => TRUE,
13781       ),
13782       'type_id' => array(
13783         'description' => 'TODO: please describe this field!',
13784         'type' => 'int',
13785         'not null' => TRUE,
13786       ),
13787       'synonym_sgml' => array(
13788         'description' => 'TODO: please describe this field!',
13789         'type' => 'varchar',
13790         'length' => '255',
13791         'not null' => TRUE,
13792       ),
13793     ),
13794     'primary key' => array(
13795       0 => 'synonym_id',
13796     ),
13797     'unique keys' => array(
13798       'synonym_c1' => array(
13799         0 => 'name',
13800         1 => 'type_id',
13801       ),
13802     ),
13803     'indexes' => array(
13804       'synonym_idx1' => array(
13805         0 => 'type_id',
13806       ),
13807     ),
13808     'foreign keys' => array(
13809       'cvterm' => array(
13810         'table' => 'cvterm',
13811         'columns' => array(
13812           'type_id' => 'cvterm_id',
13813         ),
13814       ),
13815     ),
13816     'table' => 'synonym',
13817     'referring_tables' => array(
13818       0 => 'cell_line_synonym',
13819       1 => 'feature_synonym',
13820       2 => 'library_synonym',
13821     ),
13822   );
13823   return $description;
13824 }
13838 function tripal_core_chado_schema_v1_2_tableinfo() {
13839   $description =  array(
13840     'description' => 'TODO: please describe this table!',
13841     'fields' => array(
13842       'tableinfo_id' => array(
13843         'description' => 'TODO: please describe this field!',
13844         'type' => 'serial',
13845         'not null' => TRUE,
13846       ),
13847       'name' => array(
13848         'description' => 'TODO: please describe this field!',
13849         'type' => 'varchar',
13850         'length' => '30',
13851         'not null' => TRUE,
13852       ),
13853       'primary_key_column' => array(
13854         'description' => 'TODO: please describe this field!',
13855         'type' => 'varchar',
13856         'length' => '30',
13857         'not null' => FALSE,
13858       ),
13859       'is_view' => array(
13860         'description' => 'TODO: please describe this field!',
13861         'type' => 'int',
13862         'not null' => TRUE,
13863         'default' => 0,
13864       ),
13865       'view_on_table_id' => array(
13866         'description' => 'TODO: please describe this field!',
13867         'type' => 'int',
13868         'not null' => FALSE,
13869       ),
13870       'superclass_table_id' => array(
13871         'description' => 'TODO: please describe this field!',
13872         'type' => 'int',
13873         'not null' => FALSE,
13874       ),
13875       'is_updateable' => array(
13876         'description' => 'TODO: please describe this field!',
13877         'type' => 'int',
13878         'not null' => TRUE,
13879         'default' => 1,
13880       ),
13881       'modification_date' => array(
13882         'description' => 'TODO: please describe this field!',
13883         'type' => 'date',
13884         'not null' => TRUE,
13885         'default' => 'ow(',
13886       ),
13887     ),
13888     'primary key' => array(
13889       0 => 'tableinfo_id',
13890     ),
13891     'unique keys' => array(
13892       'tableinfo_c1' => array(
13893         0 => 'name',
13894       ),
13895     ),
13896     'foreign keys' => array(
13897     ),
13898     'table' => 'tableinfo',
13899     'referring_tables' => array(
13900       0 => 'control',
13901       1 => 'magedocumentation',
13902     ),
13903   );
13904   return $description;
13905 }
13919 function tripal_core_chado_schema_v1_2_treatment() {
13920   $description =  array(
13921     'description' => 'TODO: please describe this table!',
13922     'fields' => array(
13923       'treatment_id' => array(
13924         'description' => 'TODO: please describe this field!',
13925         'type' => 'serial',
13926         'not null' => TRUE,
13927       ),
13928       'rank' => array(
13929         'description' => 'TODO: please describe this field!',
13930         'type' => 'int',
13931         'not null' => TRUE,
13932         'default' => 0,
13933       ),
13934       'biomaterial_id' => array(
13935         'description' => 'TODO: please describe this field!',
13936         'type' => 'int',
13937         'not null' => TRUE,
13938       ),
13939       'type_id' => array(
13940         'description' => 'TODO: please describe this field!',
13941         'type' => 'int',
13942         'not null' => TRUE,
13943       ),
13944       'protocol_id' => array(
13945         'description' => 'TODO: please describe this field!',
13946         'type' => 'int',
13947         'not null' => FALSE,
13948       ),
13949       'name' => array(
13950         'description' => 'TODO: please describe this field!',
13951         'type' => 'text',
13952         'not null' => FALSE,
13953       ),
13954     ),
13955     'primary key' => array(
13956       0 => 'treatment_id',
13957     ),
13958     'indexes' => array(
13959       'treatment_idx1' => array(
13960         0 => 'biomaterial_id',
13961       ),
13962       'treatment_idx2' => array(
13963         0 => 'type_id',
13964       ),
13965       'treatment_idx3' => array(
13966         0 => 'protocol_id',
13967       ),
13968     ),
13969     'foreign keys' => array(
13970       'cvterm' => array(
13971         'table' => 'cvterm',
13972         'columns' => array(
13973           'type_id' => 'cvterm_id',
13974         ),
13975       ),
13976       'protocol' => array(
13977         'table' => 'protocol',
13978         'columns' => array(
13979           'protocol_id' => 'protocol_id',
13980         ),
13981       ),
13982       'biomaterial' => array(
13983         'table' => 'biomaterial',
13984         'columns' => array(
13985           'biomaterial_id' => 'biomaterial_id',
13986         ),
13987       ),
13988     ),
13989     'table' => 'treatment',
13990     'referring_tables' => array(
13991       0 => 'biomaterial_treatment',
13992     ),
13993   );
13994   return $description;
13995 }
13996 
14006 function tripal_core_chado_get_v1_2_tables() {
14007   $tables = array(
14008     'acquisition',
14009     'acquisition_relationship',
14010     'acquisitionprop',
14011     'analysis',
14012     'analysisfeature',
14013     'analysisfeatureprop',
14014     'analysisprop',
14015     'arraydesign',
14016     'arraydesignprop',
14017     'assay',
14018     'assay_biomaterial',
14019     'assay_project',
14020     'assayprop',
14021     'biomaterial',
14022     'biomaterial_dbxref',
14023     'biomaterial_relationship',
14024     'biomaterial_treatment',
14025     'biomaterialprop',
14026     'cell_line',
14027     'cell_line_cvterm',
14028     'cell_line_cvtermprop',
14029     'cell_line_dbxref',
14030     'cell_line_feature',
14031     'cell_line_library',
14032     'cell_line_pub',
14033     'cell_line_relationship',
14034     'cell_line_synonym',
14035     'cell_lineprop',
14036     'cell_lineprop_pub',
14037     'chadoprop',
14038     'channel',
14039     'contact',
14040     'contact_relationship',
14041     'control',
14042     'cv',
14043     'cvprop',
14044     'cvterm',
14045     'cvterm_dbxref',
14046     'cvterm_relationship',
14047     'cvtermpath',
14048     'cvtermprop',
14049     'cvtermsynonym',
14050     'db',
14051     'dbxref',
14052     'dbxrefprop',
14053     'eimage',
14054     'element',
14055     'element_relationship',
14056     'elementresult',
14057     'elementresult_relationship',
14058     'environment',
14059     'environment_cvterm',
14060     'expression',
14061     'expression_cvterm',
14062     'expression_cvtermprop',
14063     'expression_image',
14064     'expression_pub',
14065     'expressionprop',
14066     'feature',
14067     'feature_cvterm',
14068     'feature_cvterm_dbxref',
14069     'feature_cvterm_pub',
14070     'feature_cvtermprop',
14071     'feature_dbxref',
14072     'feature_expression',
14073     'feature_expressionprop',
14074     'feature_genotype',
14075     'feature_phenotype',
14076     'feature_pub',
14077     'feature_pubprop',
14078     'feature_relationship',
14079     'feature_relationship_pub',
14080     'feature_relationshipprop',
14081     'feature_relationshipprop_pub',
14082     'feature_synonym',
14083     'featureloc',
14084     'featureloc_pub',
14085     'featuremap',
14086     'featuremap_pub',
14087     'featurepos',
14088     'featureprop',
14089     'featureprop_pub',
14090     'featurerange',
14091     'genotype',
14092     'genotypeprop',
14093     'library',
14094     'library_cvterm',
14095     'library_dbxref',
14096     'library_feature',
14097     'library_pub',
14098     'library_synonym',
14099     'libraryprop',
14100     'libraryprop_pub',
14101     'magedocumentation',
14102     'mageml',
14103     'nd_experiment',
14104     'nd_experiment_contact',
14105     'nd_experiment_dbxref',
14106     'nd_experiment_genotype',
14107     'nd_experiment_phenotype',
14108     'nd_experiment_project',
14109     'nd_experiment_protocol',
14110     'nd_experiment_pub',
14111     'nd_experiment_stock',
14112     'nd_experiment_stock_dbxref',
14113     'nd_experiment_stockprop',
14114     'nd_experimentprop',
14115     'nd_geolocation',
14116     'nd_geolocationprop',
14117     'nd_protocol',
14118     'nd_protocol_reagent',
14119     'nd_protocolprop',
14120     'nd_reagent',
14121     'nd_reagent_relationship',
14122     'nd_reagentprop',
14123     'organism',
14124     'organism_dbxref',
14125     'organismprop',
14126     'phendesc',
14127     'phenotype',
14128     'phenotype_comparison',
14129     'phenotype_comparison_cvterm',
14130     'phenotype_cvterm',
14131     'phenstatement',
14132     'phylonode',
14133     'phylonode_dbxref',
14134     'phylonode_organism',
14135     'phylonode_pub',
14136     'phylonode_relationship',
14137     'phylonodeprop',
14138     'phylotree',
14139     'phylotree_pub',
14140     'project',
14141     'project_contact',
14142     'project_pub',
14143     'project_relationship',
14144     'projectprop',
14145     'protocol',
14146     'protocolparam',
14147     'pub',
14148     'pub_dbxref',
14149     'pub_relationship',
14150     'pubauthor',
14151     'pubprop',
14152     'quantification',
14153     'quantification_relationship',
14154     'quantificationprop',
14155     'stock',
14156     'stock_cvterm',
14157     'stock_cvtermprop',
14158     'stock_dbxref',
14159     'stock_dbxrefprop',
14160     'stock_genotype',
14161     'stock_pub',
14162     'stock_relationship',
14163     'stock_relationship_cvterm',
14164     'stock_relationship_pub',
14165     'stockcollection',
14166     'stockcollection_stock',
14167     'stockcollectionprop',
14168     'stockprop',
14169     'stockprop_pub',
14170     'study',
14171     'study_assay',
14172     'studydesign',
14173     'studydesignprop',
14174     'studyfactor',
14175     'studyfactorvalue',
14176     'studyprop',
14177     'studyprop_feature',
14178     'synonym',
14179     'tableinfo',
14180     'treatment'
14181    );  
14182    return $tables;
14183 }
 All Classes Files Functions Variables