Tripal v1.0 (6.x-1.0)
|
00001 <?php 00002 /* @file: This file contains default schema definitions for all chado v1.11 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 anohter modules 00008 * (specifically to add missing definitions) by implementing 00009 * hook_chado_schema_v1_11_<table name>(). 00010 * 00011 * @defgroup tripal_schema_v1_11_api Chado v1.11 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_11_acquisition() { 00050 $description = array( 00051 'table' => 'acquisition', 00052 'fields' => array( 00053 'acquisition_id' => array( 00054 'type' => 'serial', 00055 'not NULL' => '1', 00056 ), 00057 'assay_id' => array( 00058 'type' => 'int', 00059 'not NULL' => '1', 00060 ), 00061 'protocol_id' => array( 00062 'type' => 'int', 00063 'not NULL' => '', 00064 ), 00065 'channel_id' => array( 00066 'type' => 'int', 00067 'not NULL' => '', 00068 ), 00069 'acquisitiondate' => array( 00070 'type' => 'datetime', 00071 'not NULL' => '', 00072 'default' => 'ow(', 00073 ), 00074 'name' => array( 00075 'type' => 'text', 00076 'not NULL' => '', 00077 ), 00078 'uri' => array( 00079 'type' => 'text', 00080 'not NULL' => '', 00081 ), 00082 ), 00083 'primary key' => array( 00084 0 => 'acquisition_id', 00085 ), 00086 'unique keys' => array( 00087 'acquisition_c1' => array( 00088 0 => 'name', 00089 ), 00090 ), 00091 'indexes' => array( 00092 'acquisition_idx1' => array( 00093 0 => 'assay_id', 00094 ), 00095 'acquisition_idx2' => array( 00096 0 => 'protocol_id', 00097 ), 00098 'acquisition_idx3' => array( 00099 0 => 'channel_id', 00100 ), 00101 ), 00102 'foreign keys' => array( 00103 'protocol' => array( 00104 'table' => 'protocol', 00105 'columns' => array( 00106 'protocol_id' => 'protocol_id', 00107 ), 00108 ), 00109 'channel' => array( 00110 'table' => 'channel', 00111 'columns' => array( 00112 'channel_id' => 'channel_id', 00113 ), 00114 ), 00115 'assay' => array( 00116 'table' => 'assay', 00117 'columns' => array( 00118 'assay_id' => 'assay_id', 00119 ), 00120 ), 00121 ), 00122 ); 00123 return $description; 00124 } 00138 function tripal_core_chado_schema_v1_11_acquisition_relationship() { 00139 $description = array( 00140 'table' => 'acquisition_relationship', 00141 'fields' => array( 00142 'acquisition_relationship_id' => array( 00143 'type' => 'serial', 00144 'not NULL' => '1', 00145 ), 00146 'subject_id' => array( 00147 'type' => 'int', 00148 'not NULL' => '1', 00149 ), 00150 'type_id' => array( 00151 'type' => 'int', 00152 'not NULL' => '1', 00153 ), 00154 'object_id' => array( 00155 'type' => 'int', 00156 'not NULL' => '1', 00157 ), 00158 'value' => array( 00159 'type' => 'text', 00160 'not NULL' => '', 00161 ), 00162 'rank' => array( 00163 'type' => 'int', 00164 'not NULL' => '1', 00165 'default' => '0', 00166 ), 00167 ), 00168 'primary key' => array( 00169 0 => 'acquisition_relationship_id', 00170 ), 00171 'unique keys' => array( 00172 'acquisition_relationship_c1' => array( 00173 0 => 'subject_id', 00174 1 => 'object_id', 00175 2 => 'type_id', 00176 3 => 'rank', 00177 ), 00178 ), 00179 'indexes' => array( 00180 'acquisition_relationship_idx1' => array( 00181 0 => 'subject_id', 00182 ), 00183 'acquisition_relationship_idx2' => array( 00184 0 => 'type_id', 00185 ), 00186 'acquisition_relationship_idx3' => array( 00187 0 => 'object_id', 00188 ), 00189 ), 00190 'foreign keys' => array( 00191 'cvterm' => array( 00192 'table' => 'cvterm', 00193 'columns' => array( 00194 'type_id' => 'cvterm_id', 00195 ), 00196 ), 00197 'acquisition' => array( 00198 'table' => 'acquisition', 00199 'columns' => array( 00200 'subject_id' => 'acquisition_id', 00201 'object_id' => 'acquisition_id', 00202 ), 00203 ), 00204 ), 00205 ); 00206 return $description; 00207 } 00221 function tripal_core_chado_schema_v1_11_acquisitionprop() { 00222 $description = array( 00223 'table' => 'acquisitionprop', 00224 'fields' => array( 00225 'acquisitionprop_id' => array( 00226 'type' => 'serial', 00227 'not NULL' => '1', 00228 ), 00229 'acquisition_id' => array( 00230 'type' => 'int', 00231 'not NULL' => '1', 00232 ), 00233 'type_id' => array( 00234 'type' => 'int', 00235 'not NULL' => '1', 00236 ), 00237 'value' => array( 00238 'type' => 'text', 00239 'not NULL' => '', 00240 ), 00241 'rank' => array( 00242 'type' => 'int', 00243 'not NULL' => '1', 00244 'default' => '0', 00245 ), 00246 ), 00247 'primary key' => array( 00248 0 => 'acquisitionprop_id', 00249 ), 00250 'unique keys' => array( 00251 'acquisitionprop_c1' => array( 00252 0 => 'acquisition_id', 00253 1 => 'type_id', 00254 2 => 'rank', 00255 ), 00256 ), 00257 'indexes' => array( 00258 'acquisitionprop_idx1' => array( 00259 0 => 'acquisition_id', 00260 ), 00261 'acquisitionprop_idx2' => array( 00262 0 => 'type_id', 00263 ), 00264 ), 00265 'foreign keys' => array( 00266 'cvterm' => array( 00267 'table' => 'cvterm', 00268 'columns' => array( 00269 'type_id' => 'cvterm_id', 00270 ), 00271 ), 00272 'acquisition' => array( 00273 'table' => 'acquisition', 00274 'columns' => array( 00275 'acquisition_id' => 'acquisition_id', 00276 ), 00277 ), 00278 ), 00279 ); 00280 return $description; 00281 } 00295 function tripal_core_chado_schema_v1_11_analysis() { 00296 $description = array( 00297 'referring_tables' => array( 00298 0 => 'analysisfeature', 00299 1 => 'analysisprop', 00300 2 => 'phylotree', 00301 3 => 'quantification', 00302 ), 00303 'table' => 'analysis', 00304 'fields' => array( 00305 'analysis_id' => array( 00306 'type' => 'serial', 00307 'not NULL' => '1', 00308 ), 00309 'name' => array( 00310 'type' => 'varchar', 00311 'length' => '255', 00312 'not NULL' => '', 00313 ), 00314 'description' => array( 00315 'type' => 'text', 00316 'not NULL' => '', 00317 ), 00318 'program' => array( 00319 'type' => 'varchar', 00320 'length' => '255', 00321 'not NULL' => '1', 00322 ), 00323 'programversion' => array( 00324 'type' => 'varchar', 00325 'length' => '255', 00326 'not NULL' => '1', 00327 ), 00328 'algorithm' => array( 00329 'type' => 'varchar', 00330 'length' => '255', 00331 'not NULL' => '', 00332 ), 00333 'sourcename' => array( 00334 'type' => 'varchar', 00335 'length' => '255', 00336 'not NULL' => '', 00337 ), 00338 'sourceversion' => array( 00339 'type' => 'varchar', 00340 'length' => '255', 00341 'not NULL' => '', 00342 ), 00343 'sourceuri' => array( 00344 'type' => 'text', 00345 'not NULL' => '', 00346 ), 00347 'timeexecuted' => array( 00348 'type' => 'datetime', 00349 'not NULL' => '1', 00350 'default' => 'ow(', 00351 ), 00352 ), 00353 'primary key' => array( 00354 0 => 'analysis_id', 00355 ), 00356 'unique keys' => array( 00357 'analysis_c1' => array( 00358 0 => 'program', 00359 1 => 'programversion', 00360 2 => 'sourcename', 00361 ), 00362 ), 00363 'indexes' => array( 00364 ), 00365 'foreign keys' => array( 00366 ), 00367 ); 00368 return $description; 00369 } 00383 function tripal_core_chado_schema_v1_11_analysisfeature() { 00384 $description = array( 00385 'table' => 'analysisfeature', 00386 'fields' => array( 00387 'analysisfeature_id' => array( 00388 'type' => 'serial', 00389 'not NULL' => '1', 00390 ), 00391 'feature_id' => array( 00392 'type' => 'int', 00393 'not NULL' => '1', 00394 ), 00395 'analysis_id' => array( 00396 'type' => 'int', 00397 'not NULL' => '1', 00398 ), 00399 'rawscore' => array( 00400 'type' => 'float', 00401 'size' => 'big', 00402 'not NULL' => '', 00403 ), 00404 'normscore' => array( 00405 'type' => 'float', 00406 'size' => 'big', 00407 'not NULL' => '', 00408 ), 00409 'significance' => array( 00410 'type' => 'float', 00411 'size' => 'big', 00412 'not NULL' => '', 00413 ), 00414 'identity' => array( 00415 'type' => 'float', 00416 'size' => 'big', 00417 'not NULL' => '', 00418 ), 00419 ), 00420 'primary key' => array( 00421 0 => 'analysisfeature_id', 00422 ), 00423 'unique keys' => array( 00424 'analysisfeature_c1' => array( 00425 0 => 'feature_id', 00426 1 => 'analysis_id', 00427 ), 00428 ), 00429 'indexes' => array( 00430 'analysisfeature_idx1' => array( 00431 0 => 'feature_id', 00432 ), 00433 'analysisfeature_idx2' => array( 00434 0 => 'analysis_id', 00435 ), 00436 ), 00437 'foreign keys' => array( 00438 'feature' => array( 00439 'table' => 'feature', 00440 'columns' => array( 00441 'feature_id' => 'feature_id', 00442 ), 00443 ), 00444 'analysis' => array( 00445 'table' => 'analysis', 00446 'columns' => array( 00447 'analysis_id' => 'analysis_id', 00448 ), 00449 ), 00450 ), 00451 ); 00452 return $description; 00453 } 00467 function tripal_core_chado_schema_v1_11_analysisfeatureprop() { 00468 $description = array( 00469 'table' => 'analysisfeatureprop', 00470 'fields' => array( 00471 'analysisfeatureprop_id' => array( 00472 'type' => 'serial', 00473 'not NULL' => '1', 00474 ), 00475 'analysisfeature_id' => array( 00476 'type' => 'int', 00477 'not NULL' => '1', 00478 ), 00479 'type_id' => array( 00480 'type' => 'int', 00481 'not NULL' => '1', 00482 ), 00483 'value' => array( 00484 'type' => 'text', 00485 'not NULL' => '', 00486 ), 00487 'rank' => array( 00488 'type' => 'int', 00489 'not NULL' => '1', 00490 ), 00491 ), 00492 'primary key' => array( 00493 0 => 'analysisfeatureprop_id', 00494 ), 00495 'unique keys' => array( 00496 'analysisfeature_id_type_id_rank' => array( 00497 0 => 'analysisfeature_id', 00498 1 => 'type_id', 00499 2 => 'rank', 00500 ), 00501 ), 00502 'indexes' => array( 00503 ), 00504 'foreign keys' => array( 00505 'cvterm' => array( 00506 'table' => 'cvterm', 00507 'columns' => array( 00508 'type_id' => 'cvterm_id', 00509 ), 00510 ), 00511 'analysisfeature' => array( 00512 'table' => 'analysisfeature', 00513 'columns' => array( 00514 'analysisfeature_id' => 'analysisfeature_id', 00515 ), 00516 ), 00517 ), 00518 ); 00519 return $description; 00520 } 00534 function tripal_core_chado_schema_v1_11_analysisprop() { 00535 $description = array( 00536 'table' => 'analysisprop', 00537 'fields' => array( 00538 'analysisprop_id' => array( 00539 'type' => 'serial', 00540 'not NULL' => '1', 00541 ), 00542 'analysis_id' => array( 00543 'type' => 'int', 00544 'not NULL' => '1', 00545 ), 00546 'type_id' => array( 00547 'type' => 'int', 00548 'not NULL' => '1', 00549 ), 00550 'value' => array( 00551 'type' => 'text', 00552 'not NULL' => '', 00553 ), 00554 ), 00555 'primary key' => array( 00556 0 => 'analysisprop_id', 00557 ), 00558 'unique keys' => array( 00559 'analysisprop_c1' => array( 00560 0 => 'analysis_id', 00561 1 => 'type_id', 00562 ), 00563 ), 00564 'indexes' => array( 00565 'analysisprop_idx1' => array( 00566 0 => 'analysis_id', 00567 ), 00568 'analysisprop_idx2' => array( 00569 0 => 'type_id', 00570 ), 00571 ), 00572 'foreign keys' => array( 00573 'cvterm' => array( 00574 'table' => 'cvterm', 00575 'columns' => array( 00576 'type_id' => 'cvterm_id', 00577 ), 00578 ), 00579 'analysis' => array( 00580 'table' => 'analysis', 00581 'columns' => array( 00582 'analysis_id' => 'analysis_id', 00583 ), 00584 ), 00585 ), 00586 ); 00587 return $description; 00588 } 00602 function tripal_core_chado_schema_v1_11_arraydesign() { 00603 $description = array( 00604 'table' => 'arraydesign', 00605 'fields' => array( 00606 'arraydesign_id' => array( 00607 'type' => 'serial', 00608 'not NULL' => '1', 00609 ), 00610 'manufacturer_id' => array( 00611 'type' => 'int', 00612 'not NULL' => '1', 00613 ), 00614 'platformtype_id' => array( 00615 'type' => 'int', 00616 'not NULL' => '1', 00617 ), 00618 'substratetype_id' => array( 00619 'type' => 'int', 00620 'not NULL' => '', 00621 ), 00622 'protocol_id' => array( 00623 'type' => 'int', 00624 'not NULL' => '', 00625 ), 00626 'dbxref_id' => array( 00627 'type' => 'int', 00628 'not NULL' => '', 00629 ), 00630 'name' => array( 00631 'type' => 'text', 00632 'not NULL' => '1', 00633 ), 00634 'version' => array( 00635 'type' => 'text', 00636 'not NULL' => '', 00637 ), 00638 'description' => array( 00639 'type' => 'text', 00640 'not NULL' => '', 00641 ), 00642 'array_dimensions' => array( 00643 'type' => 'text', 00644 'not NULL' => '', 00645 ), 00646 'element_dimensions' => array( 00647 'type' => 'text', 00648 'not NULL' => '', 00649 ), 00650 'num_of_elements' => array( 00651 'type' => 'int', 00652 'not NULL' => '', 00653 ), 00654 'num_array_columns' => array( 00655 'type' => 'int', 00656 'not NULL' => '', 00657 ), 00658 'num_array_rows' => array( 00659 'type' => 'int', 00660 'not NULL' => '', 00661 ), 00662 'num_grid_columns' => array( 00663 'type' => 'int', 00664 'not NULL' => '', 00665 ), 00666 'num_grid_rows' => array( 00667 'type' => 'int', 00668 'not NULL' => '', 00669 ), 00670 'num_sub_columns' => array( 00671 'type' => 'int', 00672 'not NULL' => '', 00673 ), 00674 'num_sub_rows' => array( 00675 'type' => 'int', 00676 'not NULL' => '', 00677 ), 00678 ), 00679 'primary key' => array( 00680 0 => 'arraydesign_id', 00681 ), 00682 'unique keys' => array( 00683 'arraydesign_c1' => array( 00684 0 => 'name', 00685 ), 00686 ), 00687 'indexes' => array( 00688 'arraydesign_idx1' => array( 00689 0 => 'manufacturer_id', 00690 ), 00691 'arraydesign_idx2' => array( 00692 0 => 'platformtype_id', 00693 ), 00694 'arraydesign_idx3' => array( 00695 0 => 'substratetype_id', 00696 ), 00697 'arraydesign_idx4' => array( 00698 0 => 'protocol_id', 00699 ), 00700 'arraydesign_idx5' => array( 00701 0 => 'dbxref_id', 00702 ), 00703 ), 00704 'foreign keys' => array( 00705 'dbxref' => array( 00706 'table' => 'dbxref', 00707 'columns' => array( 00708 'dbxref_id' => 'dbxref_id', 00709 ), 00710 ), 00711 'cvterm' => array( 00712 'table' => 'cvterm', 00713 'columns' => array( 00714 'platformtype_id' => 'cvterm_id', 00715 'substratetype_id' => 'cvterm_id', 00716 ), 00717 ), 00718 'contact' => array( 00719 'table' => 'contact', 00720 'columns' => array( 00721 'manufacturer_id' => 'contact_id', 00722 ), 00723 ), 00724 'protocol' => array( 00725 'table' => 'protocol', 00726 'columns' => array( 00727 'protocol_id' => 'protocol_id', 00728 ), 00729 ), 00730 ), 00731 ); 00732 return $description; 00733 } 00747 function tripal_core_chado_schema_v1_11_arraydesignprop() { 00748 $description = array( 00749 'table' => 'arraydesignprop', 00750 'fields' => array( 00751 'arraydesignprop_id' => array( 00752 'type' => 'serial', 00753 'not NULL' => '1', 00754 ), 00755 'arraydesign_id' => array( 00756 'type' => 'int', 00757 'not NULL' => '1', 00758 ), 00759 'type_id' => array( 00760 'type' => 'int', 00761 'not NULL' => '1', 00762 ), 00763 'value' => array( 00764 'type' => 'text', 00765 'not NULL' => '', 00766 ), 00767 'rank' => array( 00768 'type' => 'int', 00769 'not NULL' => '1', 00770 'default' => '0', 00771 ), 00772 ), 00773 'primary key' => array( 00774 0 => 'arraydesignprop_id', 00775 ), 00776 'unique keys' => array( 00777 'arraydesignprop_c1' => array( 00778 0 => 'arraydesign_id', 00779 1 => 'type_id', 00780 2 => 'rank', 00781 ), 00782 ), 00783 'indexes' => array( 00784 'arraydesignprop_idx1' => array( 00785 0 => 'arraydesign_id', 00786 ), 00787 'arraydesignprop_idx2' => array( 00788 0 => 'type_id', 00789 ), 00790 ), 00791 'foreign keys' => array( 00792 'cvterm' => array( 00793 'table' => 'cvterm', 00794 'columns' => array( 00795 'type_id' => 'cvterm_id', 00796 ), 00797 ), 00798 'arraydesign' => array( 00799 'table' => 'arraydesign', 00800 'columns' => array( 00801 'arraydesign_id' => 'arraydesign_id', 00802 ), 00803 ), 00804 ), 00805 ); 00806 return $description; 00807 } 00821 function tripal_core_chado_schema_v1_11_assay() { 00822 $description = array( 00823 'table' => 'assay', 00824 'fields' => array( 00825 'assay_id' => array( 00826 'type' => 'serial', 00827 'not NULL' => '1', 00828 ), 00829 'arraydesign_id' => array( 00830 'type' => 'int', 00831 'not NULL' => '1', 00832 ), 00833 'protocol_id' => array( 00834 'type' => 'int', 00835 'not NULL' => '', 00836 ), 00837 'assaydate' => array( 00838 'type' => 'datetime', 00839 'not NULL' => '', 00840 'default' => 'ow(', 00841 ), 00842 'arrayidentifier' => array( 00843 'type' => 'text', 00844 'not NULL' => '', 00845 ), 00846 'arraybatchidentifier' => array( 00847 'type' => 'text', 00848 'not NULL' => '', 00849 ), 00850 'operator_id' => array( 00851 'type' => 'int', 00852 'not NULL' => '1', 00853 ), 00854 'dbxref_id' => array( 00855 'type' => 'int', 00856 'not NULL' => '', 00857 ), 00858 'name' => array( 00859 'type' => 'text', 00860 'not NULL' => '', 00861 ), 00862 'description' => array( 00863 'type' => 'text', 00864 'not NULL' => '', 00865 ), 00866 ), 00867 'primary key' => array( 00868 0 => 'assay_id', 00869 ), 00870 'unique keys' => array( 00871 'assay_c1' => array( 00872 0 => 'name', 00873 ), 00874 ), 00875 'indexes' => array( 00876 'assay_idx1' => array( 00877 0 => 'arraydesign_id', 00878 ), 00879 'assay_idx2' => array( 00880 0 => 'protocol_id', 00881 ), 00882 'assay_idx3' => array( 00883 0 => 'operator_id', 00884 ), 00885 'assay_idx4' => array( 00886 0 => 'dbxref_id', 00887 ), 00888 ), 00889 'foreign keys' => array( 00890 'dbxref' => array( 00891 'table' => 'dbxref', 00892 'columns' => array( 00893 'dbxref_id' => 'dbxref_id', 00894 ), 00895 ), 00896 'contact' => array( 00897 'table' => 'contact', 00898 'columns' => array( 00899 'operator_id' => 'contact_id', 00900 ), 00901 ), 00902 'protocol' => array( 00903 'table' => 'protocol', 00904 'columns' => array( 00905 'protocol_id' => 'protocol_id', 00906 ), 00907 ), 00908 'arraydesign' => array( 00909 'table' => 'arraydesign', 00910 'columns' => array( 00911 'arraydesign_id' => 'arraydesign_id', 00912 ), 00913 ), 00914 ), 00915 ); 00916 return $description; 00917 } 00931 function tripal_core_chado_schema_v1_11_assay_biomaterial() { 00932 $description = array( 00933 'table' => 'assay_biomaterial', 00934 'fields' => array( 00935 'assay_biomaterial_id' => array( 00936 'type' => 'serial', 00937 'not NULL' => '1', 00938 ), 00939 'assay_id' => array( 00940 'type' => 'int', 00941 'not NULL' => '1', 00942 ), 00943 'biomaterial_id' => array( 00944 'type' => 'int', 00945 'not NULL' => '1', 00946 ), 00947 'channel_id' => array( 00948 'type' => 'int', 00949 'not NULL' => '', 00950 ), 00951 'rank' => array( 00952 'type' => 'int', 00953 'not NULL' => '1', 00954 'default' => '0', 00955 ), 00956 ), 00957 'primary key' => array( 00958 0 => 'assay_biomaterial_id', 00959 ), 00960 'unique keys' => array( 00961 'assay_biomaterial_c1' => array( 00962 0 => 'assay_id', 00963 1 => 'biomaterial_id', 00964 2 => 'channel_id', 00965 3 => 'rank', 00966 ), 00967 ), 00968 'indexes' => array( 00969 'assay_biomaterial_idx1' => array( 00970 0 => 'assay_id', 00971 ), 00972 'assay_biomaterial_idx2' => array( 00973 0 => 'biomaterial_id', 00974 ), 00975 'assay_biomaterial_idx3' => array( 00976 0 => 'channel_id', 00977 ), 00978 ), 00979 'foreign keys' => array( 00980 'channel' => array( 00981 'table' => 'channel', 00982 'columns' => array( 00983 'channel_id' => 'channel_id', 00984 ), 00985 ), 00986 'assay' => array( 00987 'table' => 'assay', 00988 'columns' => array( 00989 'assay_id' => 'assay_id', 00990 ), 00991 ), 00992 'biomaterial' => array( 00993 'table' => 'biomaterial', 00994 'columns' => array( 00995 'biomaterial_id' => 'biomaterial_id', 00996 ), 00997 ), 00998 ), 00999 ); 01000 return $description; 01001 } 01015 function tripal_core_chado_schema_v1_11_assay_project() { 01016 $description = array( 01017 'table' => 'assay_project', 01018 'fields' => array( 01019 'assay_project_id' => array( 01020 'type' => 'serial', 01021 'not NULL' => '1', 01022 ), 01023 'assay_id' => array( 01024 'type' => 'int', 01025 'not NULL' => '1', 01026 ), 01027 'project_id' => array( 01028 'type' => 'int', 01029 'not NULL' => '1', 01030 ), 01031 ), 01032 'primary key' => array( 01033 0 => 'assay_project_id', 01034 ), 01035 'unique keys' => array( 01036 'assay_project_c1' => array( 01037 0 => 'assay_id', 01038 1 => 'project_id', 01039 ), 01040 ), 01041 'indexes' => array( 01042 'assay_project_idx1' => array( 01043 0 => 'assay_id', 01044 ), 01045 'assay_project_idx2' => array( 01046 0 => 'project_id', 01047 ), 01048 ), 01049 'foreign keys' => array( 01050 'project' => array( 01051 'table' => 'project', 01052 'columns' => array( 01053 'project_id' => 'project_id', 01054 ), 01055 ), 01056 'assay' => array( 01057 'table' => 'assay', 01058 'columns' => array( 01059 'assay_id' => 'assay_id', 01060 ), 01061 ), 01062 ), 01063 ); 01064 return $description; 01065 } 01079 function tripal_core_chado_schema_v1_11_assayprop() { 01080 $description = array( 01081 'table' => 'assayprop', 01082 'fields' => array( 01083 'assayprop_id' => array( 01084 'type' => 'serial', 01085 'not NULL' => '1', 01086 ), 01087 'assay_id' => array( 01088 'type' => 'int', 01089 'not NULL' => '1', 01090 ), 01091 'type_id' => array( 01092 'type' => 'int', 01093 'not NULL' => '1', 01094 ), 01095 'value' => array( 01096 'type' => 'text', 01097 'not NULL' => '', 01098 ), 01099 'rank' => array( 01100 'type' => 'int', 01101 'not NULL' => '1', 01102 'default' => '0', 01103 ), 01104 ), 01105 'primary key' => array( 01106 0 => 'assayprop_id', 01107 ), 01108 'unique keys' => array( 01109 'assayprop_c1' => array( 01110 0 => 'assay_id', 01111 1 => 'type_id', 01112 2 => 'rank', 01113 ), 01114 ), 01115 'indexes' => array( 01116 'assayprop_idx1' => array( 01117 0 => 'assay_id', 01118 ), 01119 'assayprop_idx2' => array( 01120 0 => 'type_id', 01121 ), 01122 ), 01123 'foreign keys' => array( 01124 'cvterm' => array( 01125 'table' => 'cvterm', 01126 'columns' => array( 01127 'type_id' => 'cvterm_id', 01128 ), 01129 ), 01130 'assay' => array( 01131 'table' => 'assay', 01132 'columns' => array( 01133 'assay_id' => 'assay_id', 01134 ), 01135 ), 01136 ), 01137 ); 01138 return $description; 01139 } 01153 function tripal_core_chado_schema_v1_11_biomaterial() { 01154 $description = array( 01155 'table' => 'biomaterial', 01156 'fields' => array( 01157 'biomaterial_id' => array( 01158 'type' => 'serial', 01159 'not NULL' => '1', 01160 ), 01161 'taxon_id' => array( 01162 'type' => 'int', 01163 'not NULL' => '', 01164 ), 01165 'biosourceprovider_id' => array( 01166 'type' => 'int', 01167 'not NULL' => '', 01168 ), 01169 'dbxref_id' => array( 01170 'type' => 'int', 01171 'not NULL' => '', 01172 ), 01173 'name' => array( 01174 'type' => 'text', 01175 'not NULL' => '', 01176 ), 01177 'description' => array( 01178 'type' => 'text', 01179 'not NULL' => '', 01180 ), 01181 ), 01182 'primary key' => array( 01183 0 => 'biomaterial_id', 01184 ), 01185 'unique keys' => array( 01186 'biomaterial_c1' => array( 01187 0 => 'name', 01188 ), 01189 ), 01190 'indexes' => array( 01191 'biomaterial_idx1' => array( 01192 0 => 'taxon_id', 01193 ), 01194 'biomaterial_idx2' => array( 01195 0 => 'biosourceprovider_id', 01196 ), 01197 'biomaterial_idx3' => array( 01198 0 => 'dbxref_id', 01199 ), 01200 ), 01201 'foreign keys' => array( 01202 'dbxref' => array( 01203 'table' => 'dbxref', 01204 'columns' => array( 01205 'dbxref_id' => 'dbxref_id', 01206 ), 01207 ), 01208 'organism' => array( 01209 'table' => 'organism', 01210 'columns' => array( 01211 'taxon_id' => 'organism_id', 01212 ), 01213 ), 01214 'contact' => array( 01215 'table' => 'contact', 01216 'columns' => array( 01217 'biosourceprovider_id' => 'contact_id', 01218 ), 01219 ), 01220 ), 01221 ); 01222 return $description; 01223 } 01237 function tripal_core_chado_schema_v1_11_biomaterial_dbxref() { 01238 $description = array( 01239 'table' => 'biomaterial_dbxref', 01240 'fields' => array( 01241 'biomaterial_dbxref_id' => array( 01242 'type' => 'serial', 01243 'not NULL' => '1', 01244 ), 01245 'biomaterial_id' => array( 01246 'type' => 'int', 01247 'not NULL' => '1', 01248 ), 01249 'dbxref_id' => array( 01250 'type' => 'int', 01251 'not NULL' => '1', 01252 ), 01253 ), 01254 'primary key' => array( 01255 0 => 'biomaterial_dbxref_id', 01256 ), 01257 'unique keys' => array( 01258 'biomaterial_dbxref_c1' => array( 01259 0 => 'biomaterial_id', 01260 1 => 'dbxref_id', 01261 ), 01262 ), 01263 'indexes' => array( 01264 'biomaterial_dbxref_idx1' => array( 01265 0 => 'biomaterial_id', 01266 ), 01267 'biomaterial_dbxref_idx2' => array( 01268 0 => 'dbxref_id', 01269 ), 01270 ), 01271 'foreign keys' => array( 01272 'dbxref' => array( 01273 'table' => 'dbxref', 01274 'columns' => array( 01275 'dbxref_id' => 'dbxref_id', 01276 ), 01277 ), 01278 'biomaterial' => array( 01279 'table' => 'biomaterial', 01280 'columns' => array( 01281 'biomaterial_id' => 'biomaterial_id', 01282 ), 01283 ), 01284 ), 01285 ); 01286 return $description; 01287 } 01301 function tripal_core_chado_schema_v1_11_biomaterial_relationship() { 01302 $description = array( 01303 'table' => 'biomaterial_relationship', 01304 'fields' => array( 01305 'biomaterial_relationship_id' => array( 01306 'type' => 'serial', 01307 'not NULL' => '1', 01308 ), 01309 'subject_id' => array( 01310 'type' => 'int', 01311 'not NULL' => '1', 01312 ), 01313 'type_id' => array( 01314 'type' => 'int', 01315 'not NULL' => '1', 01316 ), 01317 'object_id' => array( 01318 'type' => 'int', 01319 'not NULL' => '1', 01320 ), 01321 ), 01322 'primary key' => array( 01323 0 => 'biomaterial_relationship_id', 01324 ), 01325 'unique keys' => array( 01326 'biomaterial_relationship_c1' => array( 01327 0 => 'subject_id', 01328 1 => 'object_id', 01329 2 => 'type_id', 01330 ), 01331 ), 01332 'indexes' => array( 01333 'biomaterial_relationship_idx1' => array( 01334 0 => 'subject_id', 01335 ), 01336 'biomaterial_relationship_idx2' => array( 01337 0 => 'object_id', 01338 ), 01339 'biomaterial_relationship_idx3' => array( 01340 0 => 'type_id', 01341 ), 01342 ), 01343 'foreign keys' => array( 01344 'cvterm' => array( 01345 'table' => 'cvterm', 01346 'columns' => array( 01347 'type_id' => 'cvterm_id', 01348 ), 01349 ), 01350 'biomaterial' => array( 01351 'table' => 'biomaterial', 01352 'columns' => array( 01353 'subject_id' => 'biomaterial_id', 01354 'object_id' => 'biomaterial_id', 01355 ), 01356 ), 01357 ), 01358 ); 01359 return $description; 01360 } 01374 function tripal_core_chado_schema_v1_11_biomaterial_treatment() { 01375 $description = array( 01376 'table' => 'biomaterial_treatment', 01377 'fields' => array( 01378 'biomaterial_treatment_id' => array( 01379 'type' => 'serial', 01380 'not NULL' => '1', 01381 ), 01382 'biomaterial_id' => array( 01383 'type' => 'int', 01384 'not NULL' => '1', 01385 ), 01386 'treatment_id' => array( 01387 'type' => 'int', 01388 'not NULL' => '1', 01389 ), 01390 'unittype_id' => array( 01391 'type' => 'int', 01392 'not NULL' => '', 01393 ), 01394 'value' => array( 01395 'type' => 'float', 01396 'not NULL' => '', 01397 ), 01398 'rank' => array( 01399 'type' => 'int', 01400 'not NULL' => '1', 01401 'default' => '0', 01402 ), 01403 ), 01404 'primary key' => array( 01405 0 => 'biomaterial_treatment_id', 01406 ), 01407 'unique keys' => array( 01408 'biomaterial_treatment_c1' => array( 01409 0 => 'biomaterial_id', 01410 1 => 'treatment_id', 01411 ), 01412 ), 01413 'indexes' => array( 01414 'biomaterial_treatment_idx1' => array( 01415 0 => 'biomaterial_id', 01416 ), 01417 'biomaterial_treatment_idx2' => array( 01418 0 => 'treatment_id', 01419 ), 01420 'biomaterial_treatment_idx3' => array( 01421 0 => 'unittype_id', 01422 ), 01423 ), 01424 'foreign keys' => array( 01425 'cvterm' => array( 01426 'table' => 'cvterm', 01427 'columns' => array( 01428 'unittype_id' => 'cvterm_id', 01429 ), 01430 ), 01431 'biomaterial' => array( 01432 'table' => 'biomaterial', 01433 'columns' => array( 01434 'biomaterial_id' => 'biomaterial_id', 01435 ), 01436 ), 01437 'treatment' => array( 01438 'table' => 'treatment', 01439 'columns' => array( 01440 'treatment_id' => 'treatment_id', 01441 ), 01442 ), 01443 ), 01444 ); 01445 return $description; 01446 } 01460 function tripal_core_chado_schema_v1_11_biomaterialprop() { 01461 $description = array( 01462 'table' => 'biomaterialprop', 01463 'fields' => array( 01464 'biomaterialprop_id' => array( 01465 'type' => 'serial', 01466 'not NULL' => '1', 01467 ), 01468 'biomaterial_id' => array( 01469 'type' => 'int', 01470 'not NULL' => '1', 01471 ), 01472 'type_id' => array( 01473 'type' => 'int', 01474 'not NULL' => '1', 01475 ), 01476 'value' => array( 01477 'type' => 'text', 01478 'not NULL' => '', 01479 ), 01480 'rank' => array( 01481 'type' => 'int', 01482 'not NULL' => '1', 01483 'default' => '0', 01484 ), 01485 ), 01486 'primary key' => array( 01487 0 => 'biomaterialprop_id', 01488 ), 01489 'unique keys' => array( 01490 'biomaterialprop_c1' => array( 01491 0 => 'biomaterial_id', 01492 1 => 'type_id', 01493 2 => 'rank', 01494 ), 01495 ), 01496 'indexes' => array( 01497 'biomaterialprop_idx1' => array( 01498 0 => 'biomaterial_id', 01499 ), 01500 'biomaterialprop_idx2' => array( 01501 0 => 'type_id', 01502 ), 01503 ), 01504 'foreign keys' => array( 01505 'cvterm' => array( 01506 'table' => 'cvterm', 01507 'columns' => array( 01508 'type_id' => 'cvterm_id', 01509 ), 01510 ), 01511 'biomaterial' => array( 01512 'table' => 'biomaterial', 01513 'columns' => array( 01514 'biomaterial_id' => 'biomaterial_id', 01515 ), 01516 ), 01517 ), 01518 ); 01519 return $description; 01520 } 01534 function tripal_core_chado_schema_v1_11_cell_line() { 01535 $description = array( 01536 'table' => 'cell_line', 01537 'fields' => array( 01538 'cell_line_id' => array( 01539 'type' => 'serial', 01540 'not NULL' => '1', 01541 ), 01542 'name' => array( 01543 'type' => 'varchar', 01544 'length' => '255', 01545 'not NULL' => '', 01546 ), 01547 'uniquename' => array( 01548 'type' => 'varchar', 01549 'length' => '255', 01550 'not NULL' => '1', 01551 ), 01552 'organism_id' => array( 01553 'type' => 'int', 01554 'not NULL' => '1', 01555 ), 01556 'timeaccessioned' => array( 01557 'type' => 'datetime', 01558 'not NULL' => '1', 01559 'default' => 'ow(', 01560 ), 01561 'timelastmodified' => array( 01562 'type' => 'datetime', 01563 'not NULL' => '1', 01564 'default' => 'ow(', 01565 ), 01566 ), 01567 'primary key' => array( 01568 0 => 'cell_line_id', 01569 ), 01570 'unique keys' => array( 01571 'cell_line_c1' => array( 01572 0 => 'uniquename', 01573 1 => 'organism_id', 01574 ), 01575 ), 01576 'indexes' => array( 01577 ), 01578 'foreign keys' => array( 01579 'organism' => array( 01580 'table' => 'organism', 01581 'columns' => array( 01582 'organism_id' => 'organism_id', 01583 ), 01584 ), 01585 ), 01586 ); 01587 return $description; 01588 } 01602 function tripal_core_chado_schema_v1_11_cell_line_cvterm() { 01603 $description = array( 01604 'table' => 'cell_line_cvterm', 01605 'fields' => array( 01606 'cell_line_cvterm_id' => array( 01607 'type' => 'serial', 01608 'not NULL' => '1', 01609 ), 01610 'cell_line_id' => array( 01611 'type' => 'int', 01612 'not NULL' => '1', 01613 ), 01614 'cvterm_id' => array( 01615 'type' => 'int', 01616 'not NULL' => '1', 01617 ), 01618 'pub_id' => array( 01619 'type' => 'int', 01620 'not NULL' => '1', 01621 ), 01622 'rank' => array( 01623 'type' => 'int', 01624 'not NULL' => '1', 01625 'default' => '0', 01626 ), 01627 ), 01628 'primary key' => array( 01629 0 => 'cell_line_cvterm_id', 01630 ), 01631 'unique keys' => array( 01632 'cell_line_cvterm_c1' => array( 01633 0 => 'cell_line_id', 01634 1 => 'cvterm_id', 01635 2 => 'pub_id', 01636 3 => 'rank', 01637 ), 01638 ), 01639 'indexes' => array( 01640 ), 01641 'foreign keys' => array( 01642 'cvterm' => array( 01643 'table' => 'cvterm', 01644 'columns' => array( 01645 'cvterm_id' => 'cvterm_id', 01646 ), 01647 ), 01648 'pub' => array( 01649 'table' => 'pub', 01650 'columns' => array( 01651 'pub_id' => 'pub_id', 01652 ), 01653 ), 01654 'cell_line' => array( 01655 'table' => 'cell_line', 01656 'columns' => array( 01657 'cell_line_id' => 'cell_line_id', 01658 ), 01659 ), 01660 ), 01661 ); 01662 return $description; 01663 } 01677 function tripal_core_chado_schema_v1_11_cell_line_cvtermprop() { 01678 $description = array( 01679 'table' => 'cell_line_cvtermprop', 01680 'fields' => array( 01681 'cell_line_cvtermprop_id' => array( 01682 'type' => 'serial', 01683 'not NULL' => '1', 01684 ), 01685 'cell_line_cvterm_id' => array( 01686 'type' => 'int', 01687 'not NULL' => '1', 01688 ), 01689 'type_id' => array( 01690 'type' => 'int', 01691 'not NULL' => '1', 01692 ), 01693 'value' => array( 01694 'type' => 'text', 01695 'not NULL' => '', 01696 ), 01697 'rank' => array( 01698 'type' => 'int', 01699 'not NULL' => '1', 01700 'default' => '0', 01701 ), 01702 ), 01703 'primary key' => array( 01704 0 => 'cell_line_cvtermprop_id', 01705 ), 01706 'unique keys' => array( 01707 'cell_line_cvtermprop_c1' => array( 01708 0 => 'cell_line_cvterm_id', 01709 1 => 'type_id', 01710 2 => 'rank', 01711 ), 01712 ), 01713 'indexes' => array( 01714 ), 01715 'foreign keys' => array( 01716 'cvterm' => array( 01717 'table' => 'cvterm', 01718 'columns' => array( 01719 'type_id' => 'cvterm_id', 01720 ), 01721 ), 01722 'cell_line_cvterm' => array( 01723 'table' => 'cell_line_cvterm', 01724 'columns' => array( 01725 'cell_line_cvterm_id' => 'cell_line_cvterm_id', 01726 ), 01727 ), 01728 ), 01729 ); 01730 return $description; 01731 } 01745 function tripal_core_chado_schema_v1_11_cell_line_dbxref() { 01746 $description = array( 01747 'table' => 'cell_line_dbxref', 01748 'fields' => array( 01749 'cell_line_dbxref_id' => array( 01750 'type' => 'serial', 01751 'not NULL' => '1', 01752 ), 01753 'cell_line_id' => array( 01754 'type' => 'int', 01755 'not NULL' => '1', 01756 ), 01757 'dbxref_id' => array( 01758 'type' => 'int', 01759 'not NULL' => '1', 01760 ), 01761 'is_current' => array( 01762 'type' => 'boolean', 01763 'not NULL' => '1', 01764 'default' => 'ru', 01765 ), 01766 ), 01767 'primary key' => array( 01768 0 => 'cell_line_dbxref_id', 01769 ), 01770 'unique keys' => array( 01771 'cell_line_dbxref_c1' => array( 01772 0 => 'cell_line_id', 01773 1 => 'dbxref_id', 01774 ), 01775 ), 01776 'indexes' => array( 01777 ), 01778 'foreign keys' => array( 01779 'dbxref' => array( 01780 'table' => 'dbxref', 01781 'columns' => array( 01782 'dbxref_id' => 'dbxref_id', 01783 ), 01784 ), 01785 'cell_line' => array( 01786 'table' => 'cell_line', 01787 'columns' => array( 01788 'cell_line_id' => 'cell_line_id', 01789 ), 01790 ), 01791 ), 01792 ); 01793 return $description; 01794 } 01808 function tripal_core_chado_schema_v1_11_cell_line_feature() { 01809 $description = array( 01810 'table' => 'cell_line_feature', 01811 'fields' => array( 01812 'cell_line_feature_id' => array( 01813 'type' => 'serial', 01814 'not NULL' => '1', 01815 ), 01816 'cell_line_id' => array( 01817 'type' => 'int', 01818 'not NULL' => '1', 01819 ), 01820 'feature_id' => array( 01821 'type' => 'int', 01822 'not NULL' => '1', 01823 ), 01824 'pub_id' => array( 01825 'type' => 'int', 01826 'not NULL' => '1', 01827 ), 01828 ), 01829 'primary key' => array( 01830 0 => 'cell_line_feature_id', 01831 ), 01832 'unique keys' => array( 01833 'cell_line_feature_c1' => array( 01834 0 => 'cell_line_id', 01835 1 => 'feature_id', 01836 2 => 'pub_id', 01837 ), 01838 ), 01839 'indexes' => array( 01840 ), 01841 'foreign keys' => array( 01842 'pub' => array( 01843 'table' => 'pub', 01844 'columns' => array( 01845 'pub_id' => 'pub_id', 01846 ), 01847 ), 01848 'feature' => array( 01849 'table' => 'feature', 01850 'columns' => array( 01851 'feature_id' => 'feature_id', 01852 ), 01853 ), 01854 'cell_line' => array( 01855 'table' => 'cell_line', 01856 'columns' => array( 01857 'cell_line_id' => 'cell_line_id', 01858 ), 01859 ), 01860 ), 01861 ); 01862 return $description; 01863 } 01877 function tripal_core_chado_schema_v1_11_cell_line_library() { 01878 $description = array( 01879 'table' => 'cell_line_library', 01880 'fields' => array( 01881 'cell_line_library_id' => array( 01882 'type' => 'serial', 01883 'not NULL' => '1', 01884 ), 01885 'cell_line_id' => array( 01886 'type' => 'int', 01887 'not NULL' => '1', 01888 ), 01889 'library_id' => array( 01890 'type' => 'int', 01891 'not NULL' => '1', 01892 ), 01893 'pub_id' => array( 01894 'type' => 'int', 01895 'not NULL' => '1', 01896 ), 01897 ), 01898 'primary key' => array( 01899 0 => 'cell_line_library_id', 01900 ), 01901 'unique keys' => array( 01902 'cell_line_library_c1' => array( 01903 0 => 'cell_line_id', 01904 1 => 'library_id', 01905 2 => 'pub_id', 01906 ), 01907 ), 01908 'indexes' => array( 01909 ), 01910 'foreign keys' => array( 01911 'pub' => array( 01912 'table' => 'pub', 01913 'columns' => array( 01914 'pub_id' => 'pub_id', 01915 ), 01916 ), 01917 'library' => array( 01918 'table' => 'library', 01919 'columns' => array( 01920 'library_id' => 'library_id', 01921 ), 01922 ), 01923 'cell_line' => array( 01924 'table' => 'cell_line', 01925 'columns' => array( 01926 'cell_line_id' => 'cell_line_id', 01927 ), 01928 ), 01929 ), 01930 ); 01931 return $description; 01932 } 01946 function tripal_core_chado_schema_v1_11_cell_line_pub() { 01947 $description = array( 01948 'table' => 'cell_line_pub', 01949 'fields' => array( 01950 'cell_line_pub_id' => array( 01951 'type' => 'serial', 01952 'not NULL' => '1', 01953 ), 01954 'cell_line_id' => array( 01955 'type' => 'int', 01956 'not NULL' => '1', 01957 ), 01958 'pub_id' => array( 01959 'type' => 'int', 01960 'not NULL' => '1', 01961 ), 01962 ), 01963 'primary key' => array( 01964 0 => 'cell_line_pub_id', 01965 ), 01966 'unique keys' => array( 01967 'cell_line_pub_c1' => array( 01968 0 => 'cell_line_id', 01969 1 => 'pub_id', 01970 ), 01971 ), 01972 'indexes' => array( 01973 ), 01974 'foreign keys' => array( 01975 'pub' => array( 01976 'table' => 'pub', 01977 'columns' => array( 01978 'pub_id' => 'pub_id', 01979 ), 01980 ), 01981 'cell_line' => array( 01982 'table' => 'cell_line', 01983 'columns' => array( 01984 'cell_line_id' => 'cell_line_id', 01985 ), 01986 ), 01987 ), 01988 ); 01989 return $description; 01990 } 02004 function tripal_core_chado_schema_v1_11_cell_line_relationship() { 02005 $description = array( 02006 'table' => 'cell_line_relationship', 02007 'fields' => array( 02008 'cell_line_relationship_id' => array( 02009 'type' => 'serial', 02010 'not NULL' => '1', 02011 ), 02012 'subject_id' => array( 02013 'type' => 'int', 02014 'not NULL' => '1', 02015 ), 02016 'object_id' => array( 02017 'type' => 'int', 02018 'not NULL' => '1', 02019 ), 02020 'type_id' => array( 02021 'type' => 'int', 02022 'not NULL' => '1', 02023 ), 02024 ), 02025 'primary key' => array( 02026 0 => 'cell_line_relationship_id', 02027 ), 02028 'unique keys' => array( 02029 'cell_line_relationship_c1' => array( 02030 0 => 'subject_id', 02031 1 => 'object_id', 02032 2 => 'type_id', 02033 ), 02034 ), 02035 'indexes' => array( 02036 ), 02037 'foreign keys' => array( 02038 'cvterm' => array( 02039 'table' => 'cvterm', 02040 'columns' => array( 02041 'type_id' => 'cvterm_id', 02042 ), 02043 ), 02044 'cell_line' => array( 02045 'table' => 'cell_line', 02046 'columns' => array( 02047 'subject_id' => 'cell_line_id', 02048 'object_id' => 'cell_line_id', 02049 ), 02050 ), 02051 ), 02052 ); 02053 return $description; 02054 } 02068 function tripal_core_chado_schema_v1_11_cell_line_synonym() { 02069 $description = array( 02070 'table' => 'cell_line_synonym', 02071 'fields' => array( 02072 'cell_line_synonym_id' => array( 02073 'type' => 'serial', 02074 'not NULL' => '1', 02075 ), 02076 'cell_line_id' => array( 02077 'type' => 'int', 02078 'not NULL' => '1', 02079 ), 02080 'synonym_id' => array( 02081 'type' => 'int', 02082 'not NULL' => '1', 02083 ), 02084 'pub_id' => array( 02085 'type' => 'int', 02086 'not NULL' => '1', 02087 ), 02088 'is_current' => array( 02089 'type' => 'boolean', 02090 'not NULL' => '1', 02091 'default' => 'als', 02092 ), 02093 'is_internal' => array( 02094 'type' => 'boolean', 02095 'not NULL' => '1', 02096 'default' => 'als', 02097 ), 02098 ), 02099 'primary key' => array( 02100 0 => 'cell_line_synonym_id', 02101 ), 02102 'unique keys' => array( 02103 'cell_line_synonym_c1' => array( 02104 0 => 'synonym_id', 02105 1 => 'cell_line_id', 02106 2 => 'pub_id', 02107 ), 02108 ), 02109 'indexes' => array( 02110 ), 02111 'foreign keys' => array( 02112 'pub' => array( 02113 'table' => 'pub', 02114 'columns' => array( 02115 'pub_id' => 'pub_id', 02116 ), 02117 ), 02118 'synonym' => array( 02119 'table' => 'synonym', 02120 'columns' => array( 02121 'synonym_id' => 'synonym_id', 02122 ), 02123 ), 02124 'cell_line' => array( 02125 'table' => 'cell_line', 02126 'columns' => array( 02127 'cell_line_id' => 'cell_line_id', 02128 ), 02129 ), 02130 ), 02131 ); 02132 return $description; 02133 } 02147 function tripal_core_chado_schema_v1_11_cell_lineprop() { 02148 $description = array( 02149 'table' => 'cell_lineprop', 02150 'fields' => array( 02151 'cell_lineprop_id' => array( 02152 'type' => 'serial', 02153 'not NULL' => '1', 02154 ), 02155 'cell_line_id' => array( 02156 'type' => 'int', 02157 'not NULL' => '1', 02158 ), 02159 'type_id' => array( 02160 'type' => 'int', 02161 'not NULL' => '1', 02162 ), 02163 'value' => array( 02164 'type' => 'text', 02165 'not NULL' => '', 02166 ), 02167 'rank' => array( 02168 'type' => 'int', 02169 'not NULL' => '1', 02170 'default' => '0', 02171 ), 02172 ), 02173 'primary key' => array( 02174 0 => 'cell_lineprop_id', 02175 ), 02176 'unique keys' => array( 02177 'cell_lineprop_c1' => array( 02178 0 => 'cell_line_id', 02179 1 => 'type_id', 02180 2 => 'rank', 02181 ), 02182 ), 02183 'indexes' => array( 02184 ), 02185 'foreign keys' => array( 02186 'cvterm' => array( 02187 'table' => 'cvterm', 02188 'columns' => array( 02189 'type_id' => 'cvterm_id', 02190 ), 02191 ), 02192 'cell_line' => array( 02193 'table' => 'cell_line', 02194 'columns' => array( 02195 'cell_line_id' => 'cell_line_id', 02196 ), 02197 ), 02198 ), 02199 ); 02200 return $description; 02201 } 02215 function tripal_core_chado_schema_v1_11_cell_lineprop_pub() { 02216 $description = array( 02217 'table' => 'cell_lineprop_pub', 02218 'fields' => array( 02219 'cell_lineprop_pub_id' => array( 02220 'type' => 'serial', 02221 'not NULL' => '1', 02222 ), 02223 'cell_lineprop_id' => array( 02224 'type' => 'int', 02225 'not NULL' => '1', 02226 ), 02227 'pub_id' => array( 02228 'type' => 'int', 02229 'not NULL' => '1', 02230 ), 02231 ), 02232 'primary key' => array( 02233 0 => 'cell_lineprop_pub_id', 02234 ), 02235 'unique keys' => array( 02236 'cell_lineprop_pub_c1' => array( 02237 0 => 'cell_lineprop_id', 02238 1 => 'pub_id', 02239 ), 02240 ), 02241 'indexes' => array( 02242 ), 02243 'foreign keys' => array( 02244 'pub' => array( 02245 'table' => 'pub', 02246 'columns' => array( 02247 'pub_id' => 'pub_id', 02248 ), 02249 ), 02250 'cell_lineprop' => array( 02251 'table' => 'cell_lineprop', 02252 'columns' => array( 02253 'cell_lineprop_id' => 'cell_lineprop_id', 02254 ), 02255 ), 02256 ), 02257 ); 02258 return $description; 02259 } 02273 function tripal_core_chado_schema_v1_11_channel() { 02274 $description = array( 02275 'table' => 'channel', 02276 'fields' => array( 02277 'channel_id' => array( 02278 'type' => 'serial', 02279 'not NULL' => '1', 02280 ), 02281 'name' => array( 02282 'type' => 'text', 02283 'not NULL' => '1', 02284 ), 02285 'definition' => array( 02286 'type' => 'text', 02287 'not NULL' => '1', 02288 ), 02289 ), 02290 'primary key' => array( 02291 0 => 'channel_id', 02292 ), 02293 'unique keys' => array( 02294 'channel_c1' => array( 02295 0 => 'name', 02296 ), 02297 ), 02298 'indexes' => array( 02299 ), 02300 'foreign keys' => array( 02301 ), 02302 ); 02303 return $description; 02304 } 02318 function tripal_core_chado_schema_v1_11_contact() { 02319 $description = array( 02320 'table' => 'contact', 02321 'fields' => array( 02322 'contact_id' => array( 02323 'type' => 'serial', 02324 'not NULL' => '1', 02325 ), 02326 'type_id' => array( 02327 'type' => 'int', 02328 'not NULL' => '', 02329 ), 02330 'name' => array( 02331 'type' => 'varchar', 02332 'length' => '255', 02333 'not NULL' => '1', 02334 ), 02335 'description' => array( 02336 'type' => 'varchar', 02337 'length' => '255', 02338 'not NULL' => '', 02339 ), 02340 ), 02341 'primary key' => array( 02342 0 => 'contact_id', 02343 ), 02344 'unique keys' => array( 02345 'contact_c1' => array( 02346 0 => 'name', 02347 ), 02348 ), 02349 'indexes' => array( 02350 ), 02351 'foreign keys' => array( 02352 'cvterm' => array( 02353 'table' => 'cvterm', 02354 'columns' => array( 02355 'type_id' => 'cvterm_id', 02356 ), 02357 ), 02358 ), 02359 ); 02360 return $description; 02361 } 02375 function tripal_core_chado_schema_v1_11_contact_relationship() { 02376 $description = array( 02377 'table' => 'contact_relationship', 02378 'fields' => array( 02379 'contact_relationship_id' => array( 02380 'type' => 'serial', 02381 'not NULL' => '1', 02382 ), 02383 'type_id' => array( 02384 'type' => 'int', 02385 'not NULL' => '1', 02386 ), 02387 'subject_id' => array( 02388 'type' => 'int', 02389 'not NULL' => '1', 02390 ), 02391 'object_id' => array( 02392 'type' => 'int', 02393 'not NULL' => '1', 02394 ), 02395 ), 02396 'primary key' => array( 02397 0 => 'contact_relationship_id', 02398 ), 02399 'unique keys' => array( 02400 'contact_relationship_c1' => array( 02401 0 => 'subject_id', 02402 1 => 'object_id', 02403 2 => 'type_id', 02404 ), 02405 ), 02406 'indexes' => array( 02407 'contact_relationship_idx1' => array( 02408 0 => 'type_id', 02409 ), 02410 'contact_relationship_idx2' => array( 02411 0 => 'subject_id', 02412 ), 02413 'contact_relationship_idx3' => array( 02414 0 => 'object_id', 02415 ), 02416 ), 02417 'foreign keys' => array( 02418 'cvterm' => array( 02419 'table' => 'cvterm', 02420 'columns' => array( 02421 'type_id' => 'cvterm_id', 02422 ), 02423 ), 02424 'contact' => array( 02425 'table' => 'contact', 02426 'columns' => array( 02427 'subject_id' => 'contact_id', 02428 'object_id' => 'contact_id', 02429 ), 02430 ), 02431 ), 02432 ); 02433 return $description; 02434 } 02448 function tripal_core_chado_schema_v1_11_control() { 02449 $description = array( 02450 'table' => 'control', 02451 'fields' => array( 02452 'control_id' => array( 02453 'type' => 'serial', 02454 'not NULL' => '1', 02455 ), 02456 'type_id' => array( 02457 'type' => 'int', 02458 'not NULL' => '1', 02459 ), 02460 'assay_id' => array( 02461 'type' => 'int', 02462 'not NULL' => '1', 02463 ), 02464 'tableinfo_id' => array( 02465 'type' => 'int', 02466 'not NULL' => '1', 02467 ), 02468 'row_id' => array( 02469 'type' => 'int', 02470 'not NULL' => '1', 02471 ), 02472 'name' => array( 02473 'type' => 'text', 02474 'not NULL' => '', 02475 ), 02476 'value' => array( 02477 'type' => 'text', 02478 'not NULL' => '', 02479 ), 02480 'rank' => array( 02481 'type' => 'int', 02482 'not NULL' => '1', 02483 'default' => '0', 02484 ), 02485 ), 02486 'primary key' => array( 02487 0 => 'control_id', 02488 ), 02489 'unique keys' => array( 02490 ), 02491 'indexes' => array( 02492 'control_idx1' => array( 02493 0 => 'type_id', 02494 ), 02495 'control_idx2' => array( 02496 0 => 'assay_id', 02497 ), 02498 'control_idx3' => array( 02499 0 => 'tableinfo_id', 02500 ), 02501 'control_idx4' => array( 02502 0 => 'row_id', 02503 ), 02504 ), 02505 'foreign keys' => array( 02506 'tableinfo' => array( 02507 'table' => 'tableinfo', 02508 'columns' => array( 02509 'tableinfo_id' => 'tableinfo_id', 02510 ), 02511 ), 02512 'cvterm' => array( 02513 'table' => 'cvterm', 02514 'columns' => array( 02515 'type_id' => 'cvterm_id', 02516 ), 02517 ), 02518 'assay' => array( 02519 'table' => 'assay', 02520 'columns' => array( 02521 'assay_id' => 'assay_id', 02522 ), 02523 ), 02524 ), 02525 ); 02526 return $description; 02527 } 02541 function tripal_core_chado_schema_v1_11_cv() { 02542 $description = array( 02543 'table' => 'cv', 02544 'fields' => array( 02545 'cv_id' => array( 02546 'type' => 'serial', 02547 'not NULL' => '1', 02548 ), 02549 'name' => array( 02550 'type' => 'varchar', 02551 'length' => '255', 02552 'not NULL' => '1', 02553 ), 02554 'definition' => array( 02555 'type' => 'text', 02556 'not NULL' => '', 02557 ), 02558 ), 02559 'primary key' => array( 02560 0 => 'cv_id', 02561 ), 02562 'unique keys' => array( 02563 'cv_c1' => array( 02564 0 => 'name', 02565 ), 02566 ), 02567 'indexes' => array( 02568 ), 02569 'foreign keys' => array( 02570 ), 02571 ); 02572 return $description; 02573 } 02587 function tripal_core_chado_schema_v1_11_cvterm() { 02588 $description = array( 02589 'table' => 'cvterm', 02590 'fields' => array( 02591 'cvterm_id' => array( 02592 'type' => 'serial', 02593 'not NULL' => '1', 02594 ), 02595 'cv_id' => array( 02596 'type' => 'int', 02597 'not NULL' => '1', 02598 ), 02599 'name' => array( 02600 'type' => 'varchar', 02601 'length' => '1024', 02602 'not NULL' => '1', 02603 ), 02604 'definition' => array( 02605 'type' => 'text', 02606 'not NULL' => '', 02607 ), 02608 'dbxref_id' => array( 02609 'type' => 'int', 02610 'not NULL' => '1', 02611 ), 02612 'is_obsolete' => array( 02613 'type' => 'int', 02614 'not NULL' => '1', 02615 'default' => '0', 02616 ), 02617 'is_relationshiptype' => array( 02618 'type' => 'int', 02619 'not NULL' => '1', 02620 'default' => '0', 02621 ), 02622 ), 02623 'primary key' => array( 02624 0 => 'cvterm_id', 02625 ), 02626 'unique keys' => array( 02627 'cvterm_c1' => array( 02628 0 => 'name', 02629 1 => 'cv_id', 02630 2 => 'is_obsolete', 02631 ), 02632 'cvterm_c2' => array( 02633 0 => 'dbxref_id', 02634 ), 02635 ), 02636 'indexes' => array( 02637 'cvterm_idx1' => array( 02638 0 => 'cv_id', 02639 ), 02640 'cvterm_idx2' => array( 02641 0 => 'name', 02642 ), 02643 'cvterm_idx3' => array( 02644 0 => 'dbxref_id', 02645 ), 02646 ), 02647 'foreign keys' => array( 02648 'dbxref' => array( 02649 'table' => 'dbxref', 02650 'columns' => array( 02651 'dbxref_id' => 'dbxref_id', 02652 ), 02653 ), 02654 'cv' => array( 02655 'table' => 'cv', 02656 'columns' => array( 02657 'cv_id' => 'cv_id', 02658 ), 02659 ), 02660 ), 02661 ); 02662 return $description; 02663 } 02677 function tripal_core_chado_schema_v1_11_cvterm_dbxref() { 02678 $description = array( 02679 'table' => 'cvterm_dbxref', 02680 'fields' => array( 02681 'cvterm_dbxref_id' => array( 02682 'type' => 'serial', 02683 'not NULL' => '1', 02684 ), 02685 'cvterm_id' => array( 02686 'type' => 'int', 02687 'not NULL' => '1', 02688 ), 02689 'dbxref_id' => array( 02690 'type' => 'int', 02691 'not NULL' => '1', 02692 ), 02693 'is_for_definition' => array( 02694 'type' => 'int', 02695 'not NULL' => '1', 02696 'default' => '0', 02697 ), 02698 ), 02699 'primary key' => array( 02700 0 => 'cvterm_dbxref_id', 02701 ), 02702 'unique keys' => array( 02703 'cvterm_dbxref_c1' => array( 02704 0 => 'cvterm_id', 02705 1 => 'dbxref_id', 02706 ), 02707 ), 02708 'indexes' => array( 02709 'cvterm_dbxref_idx1' => array( 02710 0 => 'cvterm_id', 02711 ), 02712 'cvterm_dbxref_idx2' => array( 02713 0 => 'dbxref_id', 02714 ), 02715 ), 02716 'foreign keys' => array( 02717 'dbxref' => array( 02718 'table' => 'dbxref', 02719 'columns' => array( 02720 'dbxref_id' => 'dbxref_id', 02721 ), 02722 ), 02723 'cvterm' => array( 02724 'table' => 'cvterm', 02725 'columns' => array( 02726 'cvterm_id' => 'cvterm_id', 02727 ), 02728 ), 02729 ), 02730 ); 02731 return $description; 02732 } 02746 function tripal_core_chado_schema_v1_11_cvterm_relationship() { 02747 $description = array( 02748 'table' => 'cvterm_relationship', 02749 'fields' => array( 02750 'cvterm_relationship_id' => array( 02751 'type' => 'serial', 02752 'not NULL' => '1', 02753 ), 02754 'type_id' => array( 02755 'type' => 'int', 02756 'not NULL' => '1', 02757 ), 02758 'subject_id' => array( 02759 'type' => 'int', 02760 'not NULL' => '1', 02761 ), 02762 'object_id' => array( 02763 'type' => 'int', 02764 'not NULL' => '1', 02765 ), 02766 ), 02767 'primary key' => array( 02768 0 => 'cvterm_relationship_id', 02769 ), 02770 'unique keys' => array( 02771 'cvterm_relationship_c1' => array( 02772 0 => 'subject_id', 02773 1 => 'object_id', 02774 2 => 'type_id', 02775 ), 02776 ), 02777 'indexes' => array( 02778 'cvterm_relationship_idx1' => array( 02779 0 => 'type_id', 02780 ), 02781 'cvterm_relationship_idx2' => array( 02782 0 => 'subject_id', 02783 ), 02784 'cvterm_relationship_idx3' => array( 02785 0 => 'object_id', 02786 ), 02787 ), 02788 'foreign keys' => array( 02789 'cvterm' => array( 02790 'table' => 'cvterm', 02791 'columns' => array( 02792 'type_id' => 'cvterm_id', 02793 'subject_id' => 'cvterm_id', 02794 'object_id' => 'cvterm_id', 02795 ), 02796 ), 02797 ), 02798 ); 02799 return $description; 02800 } 02814 function tripal_core_chado_schema_v1_11_cvtermpath() { 02815 $description = array( 02816 'table' => 'cvtermpath', 02817 'fields' => array( 02818 'cvtermpath_id' => array( 02819 'type' => 'serial', 02820 'not NULL' => '1', 02821 ), 02822 'type_id' => array( 02823 'type' => 'int', 02824 'not NULL' => '', 02825 ), 02826 'subject_id' => array( 02827 'type' => 'int', 02828 'not NULL' => '1', 02829 ), 02830 'object_id' => array( 02831 'type' => 'int', 02832 'not NULL' => '1', 02833 ), 02834 'cv_id' => array( 02835 'type' => 'int', 02836 'not NULL' => '1', 02837 ), 02838 'pathdistance' => array( 02839 'type' => 'int', 02840 'not NULL' => '', 02841 ), 02842 ), 02843 'primary key' => array( 02844 0 => 'cvtermpath_id', 02845 ), 02846 'unique keys' => array( 02847 'cvtermpath_c1' => array( 02848 0 => 'subject_id', 02849 1 => 'object_id', 02850 2 => 'type_id', 02851 3 => 'pathdistance', 02852 ), 02853 ), 02854 'indexes' => array( 02855 'cvtermpath_idx1' => array( 02856 0 => 'type_id', 02857 ), 02858 'cvtermpath_idx2' => array( 02859 0 => 'subject_id', 02860 ), 02861 'cvtermpath_idx3' => array( 02862 0 => 'object_id', 02863 ), 02864 'cvtermpath_idx4' => array( 02865 0 => 'cv_id', 02866 ), 02867 ), 02868 'foreign keys' => array( 02869 'cv' => array( 02870 'table' => 'cv', 02871 'columns' => array( 02872 'cv_id' => 'cv_id', 02873 ), 02874 ), 02875 'cvterm' => array( 02876 'table' => 'cvterm', 02877 'columns' => array( 02878 'type_id' => 'cvterm_id', 02879 'subject_id' => 'cvterm_id', 02880 'object_id' => 'cvterm_id', 02881 ), 02882 ), 02883 ), 02884 ); 02885 return $description; 02886 } 02900 function tripal_core_chado_schema_v1_11_cvtermprop() { 02901 $description = array( 02902 'table' => 'cvtermprop', 02903 'fields' => array( 02904 'cvtermprop_id' => array( 02905 'type' => 'serial', 02906 'not NULL' => '1', 02907 ), 02908 'cvterm_id' => array( 02909 'type' => 'int', 02910 'not NULL' => '1', 02911 ), 02912 'type_id' => array( 02913 'type' => 'int', 02914 'not NULL' => '1', 02915 ), 02916 'value' => array( 02917 'type' => 'text', 02918 'not NULL' => '1', 02919 'default' => '', 02920 ), 02921 'rank' => array( 02922 'type' => 'int', 02923 'not NULL' => '1', 02924 'default' => '0', 02925 ), 02926 ), 02927 'primary key' => array( 02928 0 => 'cvtermprop_id', 02929 ), 02930 'unique keys' => array( 02931 'cvterm_id' => array( 02932 0 => 'cvterm_id', 02933 1 => 'type_id', 02934 2 => 'value', 02935 3 => 'rank', 02936 ), 02937 ), 02938 'indexes' => array( 02939 'cvtermprop_idx1' => array( 02940 0 => 'cvterm_id', 02941 ), 02942 'cvtermprop_idx2' => array( 02943 0 => 'type_id', 02944 ), 02945 ), 02946 'foreign keys' => array( 02947 'cvterm' => array( 02948 'table' => 'cvterm', 02949 'columns' => array( 02950 'cvterm_id' => 'cvterm_id', 02951 'type_id' => 'cvterm_id', 02952 ), 02953 ), 02954 ), 02955 ); 02956 return $description; 02957 } 02971 function tripal_core_chado_schema_v1_11_cvtermsynonym() { 02972 $description = array( 02973 'table' => 'cvtermsynonym', 02974 'fields' => array( 02975 'cvtermsynonym_id' => array( 02976 'type' => 'serial', 02977 'not NULL' => '1', 02978 ), 02979 'cvterm_id' => array( 02980 'type' => 'int', 02981 'not NULL' => '1', 02982 ), 02983 'synonym' => array( 02984 'type' => 'varchar', 02985 'length' => '1024', 02986 'not NULL' => '1', 02987 ), 02988 'type_id' => array( 02989 'type' => 'int', 02990 'not NULL' => '', 02991 ), 02992 ), 02993 'primary key' => array( 02994 0 => 'cvtermsynonym_id', 02995 ), 02996 'unique keys' => array( 02997 'cvtermsynonym_c1' => array( 02998 0 => 'cvterm_id', 02999 1 => 'synonym', 03000 ), 03001 ), 03002 'indexes' => array( 03003 'cvtermsynonym_idx1' => array( 03004 0 => 'cvterm_id', 03005 ), 03006 ), 03007 'foreign keys' => array( 03008 'cvterm' => array( 03009 'table' => 'cvterm', 03010 'columns' => array( 03011 'cvterm_id' => 'cvterm_id', 03012 'type_id' => 'cvterm_id', 03013 ), 03014 ), 03015 ), 03016 ); 03017 return $description; 03018 } 03032 function tripal_core_chado_schema_v1_11_db() { 03033 $description = array( 03034 'table' => 'db', 03035 'fields' => array( 03036 'db_id' => array( 03037 'type' => 'serial', 03038 'not NULL' => '1', 03039 ), 03040 'name' => array( 03041 'type' => 'varchar', 03042 'length' => '255', 03043 'not NULL' => '1', 03044 ), 03045 'description' => array( 03046 'type' => 'varchar', 03047 'length' => '255', 03048 'not NULL' => '', 03049 ), 03050 'urlprefix' => array( 03051 'type' => 'varchar', 03052 'length' => '255', 03053 'not NULL' => '', 03054 ), 03055 'url' => array( 03056 'type' => 'varchar', 03057 'length' => '255', 03058 'not NULL' => '', 03059 ), 03060 ), 03061 'primary key' => array( 03062 0 => 'db_id', 03063 ), 03064 'unique keys' => array( 03065 'db_c1' => array( 03066 0 => 'name', 03067 ), 03068 ), 03069 'indexes' => array( 03070 ), 03071 'foreign keys' => array( 03072 ), 03073 ); 03074 return $description; 03075 } 03089 function tripal_core_chado_schema_v1_11_dbxref() { 03090 $description = array( 03091 'table' => 'dbxref', 03092 'fields' => array( 03093 'dbxref_id' => array( 03094 'type' => 'serial', 03095 'not NULL' => '1', 03096 ), 03097 'db_id' => array( 03098 'type' => 'int', 03099 'not NULL' => '1', 03100 ), 03101 'accession' => array( 03102 'type' => 'varchar', 03103 'length' => '255', 03104 'not NULL' => '1', 03105 ), 03106 'version' => array( 03107 'type' => 'varchar', 03108 'length' => '255', 03109 'not NULL' => '1', 03110 'default' => '', 03111 ), 03112 'description' => array( 03113 'type' => 'text', 03114 'not NULL' => '', 03115 ), 03116 ), 03117 'primary key' => array( 03118 0 => 'dbxref_id', 03119 ), 03120 'unique keys' => array( 03121 'dbxref_c1' => array( 03122 0 => 'db_id', 03123 1 => 'accession', 03124 2 => 'version', 03125 ), 03126 ), 03127 'indexes' => array( 03128 'dbxref_idx1' => array( 03129 0 => 'db_id', 03130 ), 03131 'dbxref_idx2' => array( 03132 0 => 'accession', 03133 ), 03134 'dbxref_idx3' => array( 03135 0 => 'version', 03136 ), 03137 ), 03138 'foreign keys' => array( 03139 'db' => array( 03140 'table' => 'db', 03141 'columns' => array( 03142 'db_id' => 'db_id', 03143 ), 03144 ), 03145 ), 03146 ); 03147 return $description; 03148 } 03162 function tripal_core_chado_schema_v1_11_dbxrefprop() { 03163 $description = array( 03164 'table' => 'dbxrefprop', 03165 'fields' => array( 03166 'dbxrefprop_id' => array( 03167 'type' => 'serial', 03168 'not NULL' => '1', 03169 ), 03170 'dbxref_id' => array( 03171 'type' => 'int', 03172 'not NULL' => '1', 03173 ), 03174 'type_id' => array( 03175 'type' => 'int', 03176 'not NULL' => '1', 03177 ), 03178 'value' => array( 03179 'type' => 'text', 03180 'not NULL' => '1', 03181 'default' => '', 03182 ), 03183 'rank' => array( 03184 'type' => 'int', 03185 'not NULL' => '1', 03186 'default' => '0', 03187 ), 03188 ), 03189 'primary key' => array( 03190 0 => 'dbxrefprop_id', 03191 ), 03192 'unique keys' => array( 03193 'dbxrefprop_c1' => array( 03194 0 => 'dbxref_id', 03195 1 => 'type_id', 03196 2 => 'rank', 03197 ), 03198 ), 03199 'indexes' => array( 03200 'dbxrefprop_idx1' => array( 03201 0 => 'dbxref_id', 03202 ), 03203 'dbxrefprop_idx2' => array( 03204 0 => 'type_id', 03205 ), 03206 ), 03207 'foreign keys' => array( 03208 'dbxref' => array( 03209 'table' => 'dbxref', 03210 'columns' => array( 03211 'dbxref_id' => 'dbxref_id', 03212 ), 03213 ), 03214 'cvterm' => array( 03215 'table' => 'cvterm', 03216 'columns' => array( 03217 'type_id' => 'cvterm_id', 03218 ), 03219 ), 03220 ), 03221 ); 03222 return $description; 03223 } 03237 function tripal_core_chado_schema_v1_11_eimage() { 03238 $description = array( 03239 'table' => 'eimage', 03240 'fields' => array( 03241 'eimage_id' => array( 03242 'type' => 'serial', 03243 'not NULL' => '1', 03244 ), 03245 'eimage_data' => array( 03246 'type' => 'text', 03247 'not NULL' => '', 03248 ), 03249 'eimage_type' => array( 03250 'type' => 'varchar', 03251 'length' => '255', 03252 'not NULL' => '1', 03253 ), 03254 'image_uri' => array( 03255 'type' => 'varchar', 03256 'length' => '255', 03257 'not NULL' => '', 03258 ), 03259 ), 03260 'primary key' => array( 03261 0 => 'eimage_id', 03262 ), 03263 'unique keys' => array( 03264 ), 03265 'indexes' => array( 03266 ), 03267 'foreign keys' => array( 03268 ), 03269 ); 03270 return $description; 03271 } 03285 function tripal_core_chado_schema_v1_11_element() { 03286 $description = array( 03287 'table' => 'element', 03288 'fields' => array( 03289 'element_id' => array( 03290 'type' => 'serial', 03291 'not NULL' => '1', 03292 ), 03293 'feature_id' => array( 03294 'type' => 'int', 03295 'not NULL' => '', 03296 ), 03297 'arraydesign_id' => array( 03298 'type' => 'int', 03299 'not NULL' => '1', 03300 ), 03301 'type_id' => array( 03302 'type' => 'int', 03303 'not NULL' => '', 03304 ), 03305 'dbxref_id' => array( 03306 'type' => 'int', 03307 'not NULL' => '', 03308 ), 03309 ), 03310 'primary key' => array( 03311 0 => 'element_id', 03312 ), 03313 'unique keys' => array( 03314 'element_c1' => array( 03315 0 => 'feature_id', 03316 1 => 'arraydesign_id', 03317 ), 03318 ), 03319 'indexes' => array( 03320 'element_idx1' => array( 03321 0 => 'feature_id', 03322 ), 03323 'element_idx2' => array( 03324 0 => 'arraydesign_id', 03325 ), 03326 'element_idx3' => array( 03327 0 => 'type_id', 03328 ), 03329 'element_idx4' => array( 03330 0 => 'dbxref_id', 03331 ), 03332 ), 03333 'foreign keys' => array( 03334 'dbxref' => array( 03335 'table' => 'dbxref', 03336 'columns' => array( 03337 'dbxref_id' => 'dbxref_id', 03338 ), 03339 ), 03340 'cvterm' => array( 03341 'table' => 'cvterm', 03342 'columns' => array( 03343 'type_id' => 'cvterm_id', 03344 ), 03345 ), 03346 'feature' => array( 03347 'table' => 'feature', 03348 'columns' => array( 03349 'feature_id' => 'feature_id', 03350 ), 03351 ), 03352 'arraydesign' => array( 03353 'table' => 'arraydesign', 03354 'columns' => array( 03355 'arraydesign_id' => 'arraydesign_id', 03356 ), 03357 ), 03358 ), 03359 ); 03360 return $description; 03361 } 03375 function tripal_core_chado_schema_v1_11_element_relationship() { 03376 $description = array( 03377 'table' => 'element_relationship', 03378 'fields' => array( 03379 'element_relationship_id' => array( 03380 'type' => 'serial', 03381 'not NULL' => '1', 03382 ), 03383 'subject_id' => array( 03384 'type' => 'int', 03385 'not NULL' => '1', 03386 ), 03387 'type_id' => array( 03388 'type' => 'int', 03389 'not NULL' => '1', 03390 ), 03391 'object_id' => array( 03392 'type' => 'int', 03393 'not NULL' => '1', 03394 ), 03395 'value' => array( 03396 'type' => 'text', 03397 'not NULL' => '', 03398 ), 03399 'rank' => array( 03400 'type' => 'int', 03401 'not NULL' => '1', 03402 'default' => '0', 03403 ), 03404 ), 03405 'primary key' => array( 03406 0 => 'element_relationship_id', 03407 ), 03408 'unique keys' => array( 03409 'element_relationship_c1' => array( 03410 0 => 'subject_id', 03411 1 => 'object_id', 03412 2 => 'type_id', 03413 3 => 'rank', 03414 ), 03415 ), 03416 'indexes' => array( 03417 'element_relationship_idx1' => array( 03418 0 => 'subject_id', 03419 ), 03420 'element_relationship_idx2' => array( 03421 0 => 'type_id', 03422 ), 03423 'element_relationship_idx3' => array( 03424 0 => 'object_id', 03425 ), 03426 'element_relationship_idx4' => array( 03427 0 => 'value', 03428 ), 03429 ), 03430 'foreign keys' => array( 03431 'cvterm' => array( 03432 'table' => 'cvterm', 03433 'columns' => array( 03434 'type_id' => 'cvterm_id', 03435 ), 03436 ), 03437 'element' => array( 03438 'table' => 'element', 03439 'columns' => array( 03440 'subject_id' => 'element_id', 03441 'object_id' => 'element_id', 03442 ), 03443 ), 03444 ), 03445 ); 03446 return $description; 03447 } 03461 function tripal_core_chado_schema_v1_11_elementresult() { 03462 $description = array( 03463 'table' => 'elementresult', 03464 'fields' => array( 03465 'elementresult_id' => array( 03466 'type' => 'serial', 03467 'not NULL' => '1', 03468 ), 03469 'element_id' => array( 03470 'type' => 'int', 03471 'not NULL' => '1', 03472 ), 03473 'quantification_id' => array( 03474 'type' => 'int', 03475 'not NULL' => '1', 03476 ), 03477 'signal' => array( 03478 'type' => 'float', 03479 'size' => 'big', 03480 'not NULL' => '1', 03481 ), 03482 ), 03483 'primary key' => array( 03484 0 => 'elementresult_id', 03485 ), 03486 'unique keys' => array( 03487 'elementresult_c1' => array( 03488 0 => 'element_id', 03489 1 => 'quantification_id', 03490 ), 03491 ), 03492 'indexes' => array( 03493 'elementresult_idx1' => array( 03494 0 => 'element_id', 03495 ), 03496 'elementresult_idx2' => array( 03497 0 => 'quantification_id', 03498 ), 03499 'elementresult_idx3' => array( 03500 0 => 'signal', 03501 ), 03502 ), 03503 'foreign keys' => array( 03504 'quantification' => array( 03505 'table' => 'quantification', 03506 'columns' => array( 03507 'quantification_id' => 'quantification_id', 03508 ), 03509 ), 03510 'element' => array( 03511 'table' => 'element', 03512 'columns' => array( 03513 'element_id' => 'element_id', 03514 ), 03515 ), 03516 ), 03517 ); 03518 return $description; 03519 } 03533 function tripal_core_chado_schema_v1_11_elementresult_relationship() { 03534 $description = array( 03535 'table' => 'elementresult_relationship', 03536 'fields' => array( 03537 'elementresult_relationship_id' => array( 03538 'type' => 'serial', 03539 'not NULL' => '1', 03540 ), 03541 'subject_id' => array( 03542 'type' => 'int', 03543 'not NULL' => '1', 03544 ), 03545 'type_id' => array( 03546 'type' => 'int', 03547 'not NULL' => '1', 03548 ), 03549 'object_id' => array( 03550 'type' => 'int', 03551 'not NULL' => '1', 03552 ), 03553 'value' => array( 03554 'type' => 'text', 03555 'not NULL' => '', 03556 ), 03557 'rank' => array( 03558 'type' => 'int', 03559 'not NULL' => '1', 03560 'default' => '0', 03561 ), 03562 ), 03563 'primary key' => array( 03564 0 => 'elementresult_relationship_id', 03565 ), 03566 'unique keys' => array( 03567 'elementresult_relationship_c1' => array( 03568 0 => 'subject_id', 03569 1 => 'object_id', 03570 2 => 'type_id', 03571 3 => 'rank', 03572 ), 03573 ), 03574 'indexes' => array( 03575 'elementresult_relationship_idx1' => array( 03576 0 => 'subject_id', 03577 ), 03578 'elementresult_relationship_idx2' => array( 03579 0 => 'type_id', 03580 ), 03581 'elementresult_relationship_idx3' => array( 03582 0 => 'object_id', 03583 ), 03584 'elementresult_relationship_idx4' => array( 03585 0 => 'value', 03586 ), 03587 ), 03588 'foreign keys' => array( 03589 'cvterm' => array( 03590 'table' => 'cvterm', 03591 'columns' => array( 03592 'type_id' => 'cvterm_id', 03593 ), 03594 ), 03595 'elementresult' => array( 03596 'table' => 'elementresult', 03597 'columns' => array( 03598 'subject_id' => 'elementresult_id', 03599 'object_id' => 'elementresult_id', 03600 ), 03601 ), 03602 ), 03603 ); 03604 return $description; 03605 } 03619 function tripal_core_chado_schema_v1_11_environment() { 03620 $description = array( 03621 'table' => 'environment', 03622 'fields' => array( 03623 'environment_id' => array( 03624 'type' => 'serial', 03625 'not NULL' => '1', 03626 ), 03627 'uniquename' => array( 03628 'type' => 'text', 03629 'not NULL' => '1', 03630 ), 03631 'description' => array( 03632 'type' => 'text', 03633 'not NULL' => '', 03634 ), 03635 ), 03636 'primary key' => array( 03637 0 => 'environment_id', 03638 ), 03639 'unique keys' => array( 03640 'environment_c1' => array( 03641 0 => 'uniquename', 03642 ), 03643 ), 03644 'indexes' => array( 03645 'environment_idx1' => array( 03646 0 => 'uniquename', 03647 ), 03648 ), 03649 'foreign keys' => array( 03650 ), 03651 ); 03652 return $description; 03653 } 03667 function tripal_core_chado_schema_v1_11_environment_cvterm() { 03668 $description = array( 03669 'table' => 'environment_cvterm', 03670 'fields' => array( 03671 'environment_cvterm_id' => array( 03672 'type' => 'serial', 03673 'not NULL' => '1', 03674 ), 03675 'environment_id' => array( 03676 'type' => 'int', 03677 'not NULL' => '1', 03678 ), 03679 'cvterm_id' => array( 03680 'type' => 'int', 03681 'not NULL' => '1', 03682 ), 03683 ), 03684 'primary key' => array( 03685 0 => 'environment_cvterm_id', 03686 ), 03687 'unique keys' => array( 03688 'environment_cvterm_c1' => array( 03689 0 => 'environment_id', 03690 1 => 'cvterm_id', 03691 ), 03692 ), 03693 'indexes' => array( 03694 'environment_cvterm_idx1' => array( 03695 0 => 'environment_id', 03696 ), 03697 'environment_cvterm_idx2' => array( 03698 0 => 'cvterm_id', 03699 ), 03700 ), 03701 'foreign keys' => array( 03702 'cvterm' => array( 03703 'table' => 'cvterm', 03704 'columns' => array( 03705 'cvterm_id' => 'cvterm_id', 03706 ), 03707 ), 03708 'environment' => array( 03709 'table' => 'environment', 03710 'columns' => array( 03711 'environment_id' => 'environment_id', 03712 ), 03713 ), 03714 ), 03715 ); 03716 return $description; 03717 } 03731 function tripal_core_chado_schema_v1_11_expression() { 03732 $description = array( 03733 'table' => 'expression', 03734 'fields' => array( 03735 'expression_id' => array( 03736 'type' => 'serial', 03737 'not NULL' => '1', 03738 ), 03739 'uniquename' => array( 03740 'type' => 'text', 03741 'not NULL' => '1', 03742 ), 03743 'md5checksum' => array( 03744 'type' => 'char', 03745 'length' => '32', 03746 'not NULL' => '', 03747 ), 03748 'description' => array( 03749 'type' => 'text', 03750 'not NULL' => '', 03751 ), 03752 ), 03753 'primary key' => array( 03754 0 => 'expression_id', 03755 ), 03756 'unique keys' => array( 03757 'expression_c1' => array( 03758 0 => 'uniquename', 03759 ), 03760 ), 03761 'indexes' => array( 03762 ), 03763 'foreign keys' => array( 03764 ), 03765 ); 03766 return $description; 03767 } 03781 function tripal_core_chado_schema_v1_11_expression_cvterm() { 03782 $description = array( 03783 'table' => 'expression_cvterm', 03784 'fields' => array( 03785 'expression_cvterm_id' => array( 03786 'type' => 'serial', 03787 'not NULL' => '1', 03788 ), 03789 'expression_id' => array( 03790 'type' => 'int', 03791 'not NULL' => '1', 03792 ), 03793 'cvterm_id' => array( 03794 'type' => 'int', 03795 'not NULL' => '1', 03796 ), 03797 'rank' => array( 03798 'type' => 'int', 03799 'not NULL' => '1', 03800 'default' => '0', 03801 ), 03802 'cvterm_type_id' => array( 03803 'type' => 'int', 03804 'not NULL' => '1', 03805 ), 03806 ), 03807 'primary key' => array( 03808 0 => 'expression_cvterm_id', 03809 ), 03810 'unique keys' => array( 03811 'expression_cvterm_c1' => array( 03812 0 => 'expression_id', 03813 1 => 'cvterm_id', 03814 2 => 'cvterm_type_id', 03815 ), 03816 ), 03817 'indexes' => array( 03818 'expression_cvterm_idx1' => array( 03819 0 => 'expression_id', 03820 ), 03821 'expression_cvterm_idx2' => array( 03822 0 => 'cvterm_id', 03823 ), 03824 'expression_cvterm_idx3' => array( 03825 0 => 'cvterm_type_id', 03826 ), 03827 ), 03828 'foreign keys' => array( 03829 'cvterm' => array( 03830 'table' => 'cvterm', 03831 'columns' => array( 03832 'cvterm_id' => 'cvterm_id', 03833 'cvterm_type_id' => 'cvterm_id', 03834 ), 03835 ), 03836 'expression' => array( 03837 'table' => 'expression', 03838 'columns' => array( 03839 'expression_id' => 'expression_id', 03840 ), 03841 ), 03842 ), 03843 ); 03844 return $description; 03845 } 03859 function tripal_core_chado_schema_v1_11_expression_cvtermprop() { 03860 $description = array( 03861 'table' => 'expression_cvtermprop', 03862 'fields' => array( 03863 'expression_cvtermprop_id' => array( 03864 'type' => 'serial', 03865 'not NULL' => '1', 03866 ), 03867 'expression_cvterm_id' => array( 03868 'type' => 'int', 03869 'not NULL' => '1', 03870 ), 03871 'type_id' => array( 03872 'type' => 'int', 03873 'not NULL' => '1', 03874 ), 03875 'value' => array( 03876 'type' => 'text', 03877 'not NULL' => '', 03878 ), 03879 'rank' => array( 03880 'type' => 'int', 03881 'not NULL' => '1', 03882 'default' => '0', 03883 ), 03884 ), 03885 'primary key' => array( 03886 0 => 'expression_cvtermprop_id', 03887 ), 03888 'unique keys' => array( 03889 'expression_cvtermprop_c1' => array( 03890 0 => 'expression_cvterm_id', 03891 1 => 'type_id', 03892 2 => 'rank', 03893 ), 03894 ), 03895 'indexes' => array( 03896 'expression_cvtermprop_idx1' => array( 03897 0 => 'expression_cvterm_id', 03898 ), 03899 'expression_cvtermprop_idx2' => array( 03900 0 => 'type_id', 03901 ), 03902 ), 03903 'foreign keys' => array( 03904 'cvterm' => array( 03905 'table' => 'cvterm', 03906 'columns' => array( 03907 'type_id' => 'cvterm_id', 03908 ), 03909 ), 03910 'expression_cvterm' => array( 03911 'table' => 'expression_cvterm', 03912 'columns' => array( 03913 'expression_cvterm_id' => 'expression_cvterm_id', 03914 ), 03915 ), 03916 ), 03917 ); 03918 return $description; 03919 } 03933 function tripal_core_chado_schema_v1_11_expression_image() { 03934 $description = array( 03935 'table' => 'expression_image', 03936 'fields' => array( 03937 'expression_image_id' => array( 03938 'type' => 'serial', 03939 'not NULL' => '1', 03940 ), 03941 'expression_id' => array( 03942 'type' => 'int', 03943 'not NULL' => '1', 03944 ), 03945 'eimage_id' => array( 03946 'type' => 'int', 03947 'not NULL' => '1', 03948 ), 03949 ), 03950 'primary key' => array( 03951 0 => 'expression_image_id', 03952 ), 03953 'unique keys' => array( 03954 'expression_image_c1' => array( 03955 0 => 'expression_id', 03956 1 => 'eimage_id', 03957 ), 03958 ), 03959 'indexes' => array( 03960 'expression_image_idx1' => array( 03961 0 => 'expression_id', 03962 ), 03963 'expression_image_idx2' => array( 03964 0 => 'eimage_id', 03965 ), 03966 ), 03967 'foreign keys' => array( 03968 'expression' => array( 03969 'table' => 'expression', 03970 'columns' => array( 03971 'expression_id' => 'expression_id', 03972 ), 03973 ), 03974 'eimage' => array( 03975 'table' => 'eimage', 03976 'columns' => array( 03977 'eimage_id' => 'eimage_id', 03978 ), 03979 ), 03980 ), 03981 ); 03982 return $description; 03983 } 03997 function tripal_core_chado_schema_v1_11_expression_pub() { 03998 $description = array( 03999 'table' => 'expression_pub', 04000 'fields' => array( 04001 'expression_pub_id' => array( 04002 'type' => 'serial', 04003 'not NULL' => '1', 04004 ), 04005 'expression_id' => array( 04006 'type' => 'int', 04007 'not NULL' => '1', 04008 ), 04009 'pub_id' => array( 04010 'type' => 'int', 04011 'not NULL' => '1', 04012 ), 04013 ), 04014 'primary key' => array( 04015 0 => 'expression_pub_id', 04016 ), 04017 'unique keys' => array( 04018 'expression_pub_c1' => array( 04019 0 => 'expression_id', 04020 1 => 'pub_id', 04021 ), 04022 ), 04023 'indexes' => array( 04024 'expression_pub_idx1' => array( 04025 0 => 'expression_id', 04026 ), 04027 'expression_pub_idx2' => array( 04028 0 => 'pub_id', 04029 ), 04030 ), 04031 'foreign keys' => array( 04032 'pub' => array( 04033 'table' => 'pub', 04034 'columns' => array( 04035 'pub_id' => 'pub_id', 04036 ), 04037 ), 04038 'expression' => array( 04039 'table' => 'expression', 04040 'columns' => array( 04041 'expression_id' => 'expression_id', 04042 ), 04043 ), 04044 ), 04045 ); 04046 return $description; 04047 } 04061 function tripal_core_chado_schema_v1_11_expressionprop() { 04062 $description = array( 04063 'table' => 'expressionprop', 04064 'fields' => array( 04065 'expressionprop_id' => array( 04066 'type' => 'serial', 04067 'not NULL' => '1', 04068 ), 04069 'expression_id' => array( 04070 'type' => 'int', 04071 'not NULL' => '1', 04072 ), 04073 'type_id' => array( 04074 'type' => 'int', 04075 'not NULL' => '1', 04076 ), 04077 'value' => array( 04078 'type' => 'text', 04079 'not NULL' => '', 04080 ), 04081 'rank' => array( 04082 'type' => 'int', 04083 'not NULL' => '1', 04084 'default' => '0', 04085 ), 04086 ), 04087 'primary key' => array( 04088 0 => 'expressionprop_id', 04089 ), 04090 'unique keys' => array( 04091 'expressionprop_c1' => array( 04092 0 => 'expression_id', 04093 1 => 'type_id', 04094 2 => 'rank', 04095 ), 04096 ), 04097 'indexes' => array( 04098 'expressionprop_idx1' => array( 04099 0 => 'expression_id', 04100 ), 04101 'expressionprop_idx2' => array( 04102 0 => 'type_id', 04103 ), 04104 ), 04105 'foreign keys' => array( 04106 'cvterm' => array( 04107 'table' => 'cvterm', 04108 'columns' => array( 04109 'type_id' => 'cvterm_id', 04110 ), 04111 ), 04112 'expression' => array( 04113 'table' => 'expression', 04114 'columns' => array( 04115 'expression_id' => 'expression_id', 04116 ), 04117 ), 04118 ), 04119 ); 04120 return $description; 04121 } 04135 function tripal_core_chado_schema_v1_11_feature() { 04136 $description = array( 04137 'table' => 'feature', 04138 'fields' => array( 04139 'feature_id' => array( 04140 'type' => 'serial', 04141 'not NULL' => '1', 04142 ), 04143 'dbxref_id' => array( 04144 'type' => 'int', 04145 'not NULL' => '', 04146 ), 04147 'organism_id' => array( 04148 'type' => 'int', 04149 'not NULL' => '1', 04150 ), 04151 'name' => array( 04152 'type' => 'varchar', 04153 'length' => '255', 04154 'not NULL' => '', 04155 ), 04156 'uniquename' => array( 04157 'type' => 'text', 04158 'not NULL' => '1', 04159 ), 04160 'residues' => array( 04161 'type' => 'text', 04162 'not NULL' => '', 04163 ), 04164 'seqlen' => array( 04165 'type' => 'int', 04166 'not NULL' => '', 04167 ), 04168 'md5checksum' => array( 04169 'type' => 'char', 04170 'length' => '32', 04171 'not NULL' => '', 04172 ), 04173 'type_id' => array( 04174 'type' => 'int', 04175 'not NULL' => '1', 04176 ), 04177 'is_analysis' => array( 04178 'type' => 'boolean', 04179 'not NULL' => '1', 04180 'default' => 'als', 04181 ), 04182 'is_obsolete' => array( 04183 'type' => 'boolean', 04184 'not NULL' => '1', 04185 'default' => 'als', 04186 ), 04187 'timeaccessioned' => array( 04188 'type' => 'datetime', 04189 'not NULL' => '1', 04190 'default' => 'ow(', 04191 ), 04192 'timelastmodified' => array( 04193 'type' => 'datetime', 04194 'not NULL' => '1', 04195 'default' => 'ow(', 04196 ), 04197 ), 04198 'primary key' => array( 04199 0 => 'feature_id', 04200 ), 04201 'unique keys' => array( 04202 'feature_c1' => array( 04203 0 => 'organism_id', 04204 1 => 'uniquename', 04205 2 => 'type_id', 04206 ), 04207 ), 04208 'indexes' => array( 04209 'feature_idx1' => array( 04210 0 => 'dbxref_id', 04211 ), 04212 'feature_idx2' => array( 04213 0 => 'organism_id', 04214 ), 04215 'feature_idx3' => array( 04216 0 => 'type_id', 04217 ), 04218 'feature_idx4' => array( 04219 0 => 'uniquename', 04220 ), 04221 'feature_name_ind1' => array( 04222 0 => 'name', 04223 ), 04224 ), 04225 'foreign keys' => array( 04226 'organism' => array( 04227 'table' => 'organism', 04228 'columns' => array( 04229 'organism_id' => 'organism_id', 04230 ), 04231 ), 04232 'dbxref' => array( 04233 'table' => 'dbxref', 04234 'columns' => array( 04235 'dbxref_id' => 'dbxref_id', 04236 ), 04237 ), 04238 'cvterm' => array( 04239 'table' => 'cvterm', 04240 'columns' => array( 04241 'type_id' => 'cvterm_id', 04242 ), 04243 ), 04244 ), 04245 'referring_tables' => array( 04246 0 => 'analysisfeature', 04247 1 => 'element', 04248 2 => 'feature_cvterm', 04249 3 => 'feature_dbxref', 04250 4 => 'feature_expression', 04251 5 => 'feature_genotype', 04252 6 => 'feature_phenotype', 04253 7 => 'feature_pub', 04254 8 => 'feature_relationship', 04255 9 => 'feature_synonym', 04256 10 => 'featureloc', 04257 11 => 'featurepos', 04258 12 => 'featureprop', 04259 13 => 'featurerange', 04260 14 => 'library_feature', 04261 15 => 'phylonode', 04262 16 => 'wwwuser_feature', 04263 ), 04264 ); 04265 return $description; 04266 } 04280 function tripal_core_chado_schema_v1_11_feature_cvterm() { 04281 $description = array( 04282 'table' => 'feature_cvterm', 04283 'fields' => array( 04284 'feature_cvterm_id' => array( 04285 'type' => 'serial', 04286 'not NULL' => '1', 04287 ), 04288 'feature_id' => array( 04289 'type' => 'int', 04290 'not NULL' => '1', 04291 ), 04292 'cvterm_id' => array( 04293 'type' => 'int', 04294 'not NULL' => '1', 04295 ), 04296 'pub_id' => array( 04297 'type' => 'int', 04298 'not NULL' => '1', 04299 ), 04300 'is_not' => array( 04301 'type' => 'boolean', 04302 'not NULL' => '1', 04303 'default' => 'als', 04304 ), 04305 'rank' => array( 04306 'type' => 'int', 04307 'not NULL' => '1', 04308 'default' => '0', 04309 ), 04310 ), 04311 'primary key' => array( 04312 0 => 'feature_cvterm_id', 04313 ), 04314 'unique keys' => array( 04315 'feature_cvterm_c1' => array( 04316 0 => 'feature_id', 04317 1 => 'cvterm_id', 04318 2 => 'pub_id', 04319 3 => 'rank', 04320 ), 04321 ), 04322 'indexes' => array( 04323 'feature_cvterm_idx1' => array( 04324 0 => 'feature_id', 04325 ), 04326 'feature_cvterm_idx2' => array( 04327 0 => 'cvterm_id', 04328 ), 04329 'feature_cvterm_idx3' => array( 04330 0 => 'pub_id', 04331 ), 04332 ), 04333 'foreign keys' => array( 04334 'feature' => array( 04335 'table' => 'feature', 04336 'columns' => array( 04337 'feature_id' => 'feature_id', 04338 ), 04339 ), 04340 'cvterm' => array( 04341 'table' => 'cvterm', 04342 'columns' => array( 04343 'cvterm_id' => 'cvterm_id', 04344 ), 04345 ), 04346 'pub' => array( 04347 'table' => 'pub', 04348 'columns' => array( 04349 'pub_id' => 'pub_id', 04350 ), 04351 ), 04352 ), 04353 ); 04354 return $description; 04355 } 04369 function tripal_core_chado_schema_v1_11_feature_cvterm_dbxref() { 04370 $description = array( 04371 'table' => 'feature_cvterm_dbxref', 04372 'fields' => array( 04373 'feature_cvterm_dbxref_id' => array( 04374 'type' => 'serial', 04375 'not NULL' => '1', 04376 ), 04377 'feature_cvterm_id' => array( 04378 'type' => 'int', 04379 'not NULL' => '1', 04380 ), 04381 'dbxref_id' => array( 04382 'type' => 'int', 04383 'not NULL' => '1', 04384 ), 04385 ), 04386 'primary key' => array( 04387 0 => 'feature_cvterm_dbxref_id', 04388 ), 04389 'unique keys' => array( 04390 'feature_cvterm_dbxref_c1' => array( 04391 0 => 'feature_cvterm_id', 04392 1 => 'dbxref_id', 04393 ), 04394 ), 04395 'indexes' => array( 04396 'feature_cvterm_dbxref_idx1' => array( 04397 0 => 'feature_cvterm_id', 04398 ), 04399 'feature_cvterm_dbxref_idx2' => array( 04400 0 => 'dbxref_id', 04401 ), 04402 ), 04403 'foreign keys' => array( 04404 'feature_cvterm' => array( 04405 'table' => 'feature_cvterm', 04406 'columns' => array( 04407 'feature_cvterm_id' => 'feature_cvterm_id', 04408 ), 04409 ), 04410 'dbxref' => array( 04411 'table' => 'dbxref', 04412 'columns' => array( 04413 'dbxref_id' => 'dbxref_id', 04414 ), 04415 ), 04416 ), 04417 ); 04418 return $description; 04419 } 04433 function tripal_core_chado_schema_v1_11_feature_cvterm_pub() { 04434 $description = array( 04435 'table' => 'feature_cvterm_pub', 04436 'fields' => array( 04437 'feature_cvterm_pub_id' => array( 04438 'type' => 'serial', 04439 'not NULL' => '1', 04440 ), 04441 'feature_cvterm_id' => array( 04442 'type' => 'int', 04443 'not NULL' => '1', 04444 ), 04445 'pub_id' => array( 04446 'type' => 'int', 04447 'not NULL' => '1', 04448 ), 04449 ), 04450 'primary key' => array( 04451 0 => 'feature_cvterm_pub_id', 04452 ), 04453 'unique keys' => array( 04454 'feature_cvterm_pub_c1' => array( 04455 0 => 'feature_cvterm_id', 04456 1 => 'pub_id', 04457 ), 04458 ), 04459 'indexes' => array( 04460 'feature_cvterm_pub_idx1' => array( 04461 0 => 'feature_cvterm_id', 04462 ), 04463 'feature_cvterm_pub_idx2' => array( 04464 0 => 'pub_id', 04465 ), 04466 ), 04467 'foreign keys' => array( 04468 'feature_cvterm' => array( 04469 'table' => 'feature_cvterm', 04470 'columns' => array( 04471 'feature_cvterm_id' => 'feature_cvterm_id', 04472 ), 04473 ), 04474 'pub' => array( 04475 'table' => 'pub', 04476 'columns' => array( 04477 'pub_id' => 'pub_id', 04478 ), 04479 ), 04480 ), 04481 ); 04482 return $description; 04483 } 04497 function tripal_core_chado_schema_v1_11_feature_cvtermprop() { 04498 $description = array( 04499 'table' => 'feature_cvtermprop', 04500 'fields' => array( 04501 'feature_cvtermprop_id' => array( 04502 'type' => 'serial', 04503 'not NULL' => '1', 04504 ), 04505 'feature_cvterm_id' => array( 04506 'type' => 'int', 04507 'not NULL' => '1', 04508 ), 04509 'type_id' => array( 04510 'type' => 'int', 04511 'not NULL' => '1', 04512 ), 04513 'value' => array( 04514 'type' => 'text', 04515 'not NULL' => '', 04516 ), 04517 'rank' => array( 04518 'type' => 'int', 04519 'not NULL' => '1', 04520 'default' => '0', 04521 ), 04522 ), 04523 'primary key' => array( 04524 0 => 'feature_cvtermprop_id', 04525 ), 04526 'unique keys' => array( 04527 'feature_cvtermprop_c1' => array( 04528 0 => 'feature_cvterm_id', 04529 1 => 'type_id', 04530 2 => 'rank', 04531 ), 04532 ), 04533 'indexes' => array( 04534 'feature_cvtermprop_idx1' => array( 04535 0 => 'feature_cvterm_id', 04536 ), 04537 'feature_cvtermprop_idx2' => array( 04538 0 => 'type_id', 04539 ), 04540 ), 04541 'foreign keys' => array( 04542 'feature_cvterm' => array( 04543 'table' => 'feature_cvterm', 04544 'columns' => array( 04545 'feature_cvterm_id' => 'feature_cvterm_id', 04546 ), 04547 ), 04548 'cvterm' => array( 04549 'table' => 'cvterm', 04550 'columns' => array( 04551 'type_id' => 'cvterm_id', 04552 ), 04553 ), 04554 ), 04555 ); 04556 return $description; 04557 } 04571 function tripal_core_chado_schema_v1_11_feature_dbxref() { 04572 $description = array( 04573 'table' => 'feature_dbxref', 04574 'fields' => array( 04575 'feature_dbxref_id' => array( 04576 'type' => 'serial', 04577 'not NULL' => '1', 04578 ), 04579 'feature_id' => array( 04580 'type' => 'int', 04581 'not NULL' => '1', 04582 ), 04583 'dbxref_id' => array( 04584 'type' => 'int', 04585 'not NULL' => '1', 04586 ), 04587 'is_current' => array( 04588 'type' => 'boolean', 04589 'not NULL' => '1', 04590 'default' => 'ru', 04591 ), 04592 ), 04593 'primary key' => array( 04594 0 => 'feature_dbxref_id', 04595 ), 04596 'unique keys' => array( 04597 'feature_dbxref_c1' => array( 04598 0 => 'feature_id', 04599 1 => 'dbxref_id', 04600 ), 04601 ), 04602 'indexes' => array( 04603 'feature_dbxref_idx1' => array( 04604 0 => 'feature_id', 04605 ), 04606 'feature_dbxref_idx2' => array( 04607 0 => 'dbxref_id', 04608 ), 04609 ), 04610 'foreign keys' => array( 04611 'feature' => array( 04612 'table' => 'feature', 04613 'columns' => array( 04614 'feature_id' => 'feature_id', 04615 ), 04616 ), 04617 'dbxref' => array( 04618 'table' => 'dbxref', 04619 'columns' => array( 04620 'dbxref_id' => 'dbxref_id', 04621 ), 04622 ), 04623 ), 04624 ); 04625 return $description; 04626 } 04640 function tripal_core_chado_schema_v1_11_feature_expression() { 04641 $description = array( 04642 'table' => 'feature_expression', 04643 'fields' => array( 04644 'feature_expression_id' => array( 04645 'type' => 'serial', 04646 'not NULL' => '1', 04647 ), 04648 'expression_id' => array( 04649 'type' => 'int', 04650 'not NULL' => '1', 04651 ), 04652 'feature_id' => array( 04653 'type' => 'int', 04654 'not NULL' => '1', 04655 ), 04656 'pub_id' => array( 04657 'type' => 'int', 04658 'not NULL' => '1', 04659 ), 04660 ), 04661 'primary key' => array( 04662 0 => 'feature_expression_id', 04663 ), 04664 'unique keys' => array( 04665 'feature_expression_c1' => array( 04666 0 => 'expression_id', 04667 1 => 'feature_id', 04668 2 => 'pub_id', 04669 ), 04670 ), 04671 'indexes' => array( 04672 'feature_expression_idx1' => array( 04673 0 => 'expression_id', 04674 ), 04675 'feature_expression_idx2' => array( 04676 0 => 'feature_id', 04677 ), 04678 'feature_expression_idx3' => array( 04679 0 => 'pub_id', 04680 ), 04681 ), 04682 'foreign keys' => array( 04683 'pub' => array( 04684 'table' => 'pub', 04685 'columns' => array( 04686 'pub_id' => 'pub_id', 04687 ), 04688 ), 04689 'feature' => array( 04690 'table' => 'feature', 04691 'columns' => array( 04692 'feature_id' => 'feature_id', 04693 ), 04694 ), 04695 'expression' => array( 04696 'table' => 'expression', 04697 'columns' => array( 04698 'expression_id' => 'expression_id', 04699 ), 04700 ), 04701 ), 04702 ); 04703 return $description; 04704 } 04718 function tripal_core_chado_schema_v1_11_feature_expressionprop() { 04719 $description = array( 04720 'table' => 'feature_expressionprop', 04721 'fields' => array( 04722 'feature_expressionprop_id' => array( 04723 'type' => 'serial', 04724 'not NULL' => '1', 04725 ), 04726 'feature_expression_id' => array( 04727 'type' => 'int', 04728 'not NULL' => '1', 04729 ), 04730 'type_id' => array( 04731 'type' => 'int', 04732 'not NULL' => '1', 04733 ), 04734 'value' => array( 04735 'type' => 'text', 04736 'not NULL' => '', 04737 ), 04738 'rank' => array( 04739 'type' => 'int', 04740 'not NULL' => '1', 04741 'default' => '0', 04742 ), 04743 ), 04744 'primary key' => array( 04745 0 => 'feature_expressionprop_id', 04746 ), 04747 'unique keys' => array( 04748 'feature_expressionprop_c1' => array( 04749 0 => 'feature_expression_id', 04750 1 => 'type_id', 04751 2 => 'rank', 04752 ), 04753 ), 04754 'indexes' => array( 04755 'feature_expressionprop_idx1' => array( 04756 0 => 'feature_expression_id', 04757 ), 04758 'feature_expressionprop_idx2' => array( 04759 0 => 'type_id', 04760 ), 04761 ), 04762 'foreign keys' => array( 04763 'cvterm' => array( 04764 'table' => 'cvterm', 04765 'columns' => array( 04766 'type_id' => 'cvterm_id', 04767 ), 04768 ), 04769 'feature_expression' => array( 04770 'table' => 'feature_expression', 04771 'columns' => array( 04772 'feature_expression_id' => 'feature_expression_id', 04773 ), 04774 ), 04775 ), 04776 ); 04777 return $description; 04778 } 04792 function tripal_core_chado_schema_v1_11_feature_genotype() { 04793 $description = array( 04794 'table' => 'feature_genotype', 04795 'fields' => array( 04796 'feature_genotype_id' => array( 04797 'type' => 'serial', 04798 'not NULL' => '1', 04799 ), 04800 'feature_id' => array( 04801 'type' => 'int', 04802 'not NULL' => '1', 04803 ), 04804 'genotype_id' => array( 04805 'type' => 'int', 04806 'not NULL' => '1', 04807 ), 04808 'chromosome_id' => array( 04809 'type' => 'int', 04810 'not NULL' => '', 04811 ), 04812 'rank' => array( 04813 'type' => 'int', 04814 'not NULL' => '1', 04815 ), 04816 'cgroup' => array( 04817 'type' => 'int', 04818 'not NULL' => '1', 04819 ), 04820 'cvterm_id' => array( 04821 'type' => 'int', 04822 'not NULL' => '1', 04823 ), 04824 ), 04825 'primary key' => array( 04826 0 => 'feature_genotype_id', 04827 ), 04828 'unique keys' => array( 04829 'feature_genotype_c1' => array( 04830 0 => 'feature_id', 04831 1 => 'genotype_id', 04832 2 => 'cvterm_id', 04833 3 => 'chromosome_id', 04834 4 => 'rank', 04835 5 => 'cgroup', 04836 ), 04837 ), 04838 'indexes' => array( 04839 'feature_genotype_idx1' => array( 04840 0 => 'feature_id', 04841 ), 04842 'feature_genotype_idx2' => array( 04843 0 => 'genotype_id', 04844 ), 04845 ), 04846 'foreign keys' => array( 04847 'cvterm' => array( 04848 'table' => 'cvterm', 04849 'columns' => array( 04850 'cvterm_id' => 'cvterm_id', 04851 ), 04852 ), 04853 'feature' => array( 04854 'table' => 'feature', 04855 'columns' => array( 04856 'feature_id' => 'feature_id', 04857 'chromosome_id' => 'feature_id', 04858 ), 04859 ), 04860 'genotype' => array( 04861 'table' => 'genotype', 04862 'columns' => array( 04863 'genotype_id' => 'genotype_id', 04864 ), 04865 ), 04866 ), 04867 ); 04868 return $description; 04869 } 04883 function tripal_core_chado_schema_v1_11_feature_phenotype() { 04884 $description = array( 04885 'table' => 'feature_phenotype', 04886 'fields' => array( 04887 'feature_phenotype_id' => array( 04888 'type' => 'serial', 04889 'not NULL' => '1', 04890 ), 04891 'feature_id' => array( 04892 'type' => 'int', 04893 'not NULL' => '1', 04894 ), 04895 'phenotype_id' => array( 04896 'type' => 'int', 04897 'not NULL' => '1', 04898 ), 04899 ), 04900 'primary key' => array( 04901 0 => 'feature_phenotype_id', 04902 ), 04903 'unique keys' => array( 04904 'feature_phenotype_c1' => array( 04905 0 => 'feature_id', 04906 1 => 'phenotype_id', 04907 ), 04908 ), 04909 'indexes' => array( 04910 'feature_phenotype_idx1' => array( 04911 0 => 'feature_id', 04912 ), 04913 'feature_phenotype_idx2' => array( 04914 0 => 'phenotype_id', 04915 ), 04916 ), 04917 'foreign keys' => array( 04918 'feature' => array( 04919 'table' => 'feature', 04920 'columns' => array( 04921 'feature_id' => 'feature_id', 04922 ), 04923 ), 04924 'phenotype' => array( 04925 'table' => 'phenotype', 04926 'columns' => array( 04927 'phenotype_id' => 'phenotype_id', 04928 ), 04929 ), 04930 ), 04931 ); 04932 return $description; 04933 } 04947 function tripal_core_chado_schema_v1_11_feature_pub() { 04948 $description = array( 04949 'table' => 'feature_pub', 04950 'fields' => array( 04951 'feature_pub_id' => array( 04952 'type' => 'serial', 04953 'not NULL' => '1', 04954 ), 04955 'feature_id' => array( 04956 'type' => 'int', 04957 'not NULL' => '1', 04958 ), 04959 'pub_id' => array( 04960 'type' => 'int', 04961 'not NULL' => '1', 04962 ), 04963 ), 04964 'primary key' => array( 04965 0 => 'feature_pub_id', 04966 ), 04967 'unique keys' => array( 04968 'feature_pub_c1' => array( 04969 0 => 'feature_id', 04970 1 => 'pub_id', 04971 ), 04972 ), 04973 'indexes' => array( 04974 'feature_pub_idx1' => array( 04975 0 => 'feature_id', 04976 ), 04977 'feature_pub_idx2' => array( 04978 0 => 'pub_id', 04979 ), 04980 ), 04981 'foreign keys' => array( 04982 'pub' => array( 04983 'table' => 'pub', 04984 'columns' => array( 04985 'pub_id' => 'pub_id', 04986 ), 04987 ), 04988 'feature' => array( 04989 'table' => 'feature', 04990 'columns' => array( 04991 'feature_id' => 'feature_id', 04992 ), 04993 ), 04994 ), 04995 ); 04996 return $description; 04997 } 05011 function tripal_core_chado_schema_v1_11_feature_pubprop() { 05012 $description = array( 05013 'table' => 'feature_pubprop', 05014 'fields' => array( 05015 'feature_pubprop_id' => array( 05016 'type' => 'serial', 05017 'not NULL' => '1', 05018 ), 05019 'feature_pub_id' => array( 05020 'type' => 'int', 05021 'not NULL' => '1', 05022 ), 05023 'type_id' => array( 05024 'type' => 'int', 05025 'not NULL' => '1', 05026 ), 05027 'value' => array( 05028 'type' => 'text', 05029 'not NULL' => '', 05030 ), 05031 'rank' => array( 05032 'type' => 'int', 05033 'not NULL' => '1', 05034 'default' => '0', 05035 ), 05036 ), 05037 'primary key' => array( 05038 0 => 'feature_pubprop_id', 05039 ), 05040 'unique keys' => array( 05041 'feature_pubprop_c1' => array( 05042 0 => 'feature_pub_id', 05043 1 => 'type_id', 05044 2 => 'rank', 05045 ), 05046 ), 05047 'indexes' => array( 05048 'feature_pubprop_idx1' => array( 05049 0 => 'feature_pub_id', 05050 ), 05051 ), 05052 'foreign keys' => array( 05053 'cvterm' => array( 05054 'table' => 'cvterm', 05055 'columns' => array( 05056 'type_id' => 'cvterm_id', 05057 ), 05058 ), 05059 'feature_pub' => array( 05060 'table' => 'feature_pub', 05061 'columns' => array( 05062 'feature_pub_id' => 'feature_pub_id', 05063 ), 05064 ), 05065 ), 05066 ); 05067 return $description; 05068 } 05082 function tripal_core_chado_schema_v1_11_feature_relationship() { 05083 $description = array( 05084 'table' => 'feature_relationship', 05085 'fields' => array( 05086 'feature_relationship_id' => array( 05087 'type' => 'serial', 05088 'not NULL' => '1', 05089 ), 05090 'subject_id' => array( 05091 'type' => 'int', 05092 'not NULL' => '1', 05093 ), 05094 'object_id' => array( 05095 'type' => 'int', 05096 'not NULL' => '1', 05097 ), 05098 'type_id' => array( 05099 'type' => 'int', 05100 'not NULL' => '1', 05101 ), 05102 'value' => array( 05103 'type' => 'text', 05104 'not NULL' => '', 05105 ), 05106 'rank' => array( 05107 'type' => 'int', 05108 'not NULL' => '1', 05109 'default' => '0', 05110 ), 05111 ), 05112 'primary key' => array( 05113 0 => 'feature_relationship_id', 05114 ), 05115 'unique keys' => array( 05116 'feature_relationship_c1' => array( 05117 0 => 'subject_id', 05118 1 => 'object_id', 05119 2 => 'type_id', 05120 3 => 'rank', 05121 ), 05122 ), 05123 'indexes' => array( 05124 'feature_relationship_idx1' => array( 05125 0 => 'subject_id', 05126 ), 05127 'feature_relationship_idx2' => array( 05128 0 => 'object_id', 05129 ), 05130 'feature_relationship_idx3' => array( 05131 0 => 'type_id', 05132 ), 05133 ), 05134 'foreign keys' => array( 05135 'feature' => array( 05136 'table' => 'feature', 05137 'columns' => array( 05138 'object_id' => 'feature_id', 05139 'subject_id' => 'feature_id', 05140 ), 05141 ), 05142 'cvterm' => array( 05143 'table' => 'cvterm', 05144 'columns' => array( 05145 'type_id' => 'cvterm_id', 05146 ), 05147 ), 05148 ), 05149 ); 05150 return $description; 05151 } 05165 function tripal_core_chado_schema_v1_11_feature_relationship_pub() { 05166 $description = array( 05167 'table' => 'feature_relationship_pub', 05168 'fields' => array( 05169 'feature_relationship_pub_id' => array( 05170 'type' => 'serial', 05171 'not NULL' => '1', 05172 ), 05173 'feature_relationship_id' => array( 05174 'type' => 'int', 05175 'not NULL' => '1', 05176 ), 05177 'pub_id' => array( 05178 'type' => 'int', 05179 'not NULL' => '1', 05180 ), 05181 ), 05182 'primary key' => array( 05183 0 => 'feature_relationship_pub_id', 05184 ), 05185 'unique keys' => array( 05186 'feature_relationship_pub_c1' => array( 05187 0 => 'feature_relationship_id', 05188 1 => 'pub_id', 05189 ), 05190 ), 05191 'indexes' => array( 05192 'feature_relationship_pub_idx1' => array( 05193 0 => 'feature_relationship_id', 05194 ), 05195 'feature_relationship_pub_idx2' => array( 05196 0 => 'pub_id', 05197 ), 05198 ), 05199 'foreign keys' => array( 05200 'pub' => array( 05201 'table' => 'pub', 05202 'columns' => array( 05203 'pub_id' => 'pub_id', 05204 ), 05205 ), 05206 'feature_relationship' => array( 05207 'table' => 'feature_relationship', 05208 'columns' => array( 05209 'feature_relationship_id' => 'feature_relationship_id', 05210 ), 05211 ), 05212 ), 05213 ); 05214 return $description; 05215 } 05229 function tripal_core_chado_schema_v1_11_feature_relationshipprop() { 05230 $description = array( 05231 'table' => 'feature_relationshipprop', 05232 'fields' => array( 05233 'feature_relationshipprop_id' => array( 05234 'type' => 'serial', 05235 'not NULL' => '1', 05236 ), 05237 'feature_relationship_id' => array( 05238 'type' => 'int', 05239 'not NULL' => '1', 05240 ), 05241 'type_id' => array( 05242 'type' => 'int', 05243 'not NULL' => '1', 05244 ), 05245 'value' => array( 05246 'type' => 'text', 05247 'not NULL' => '', 05248 ), 05249 'rank' => array( 05250 'type' => 'int', 05251 'not NULL' => '1', 05252 'default' => '0', 05253 ), 05254 ), 05255 'primary key' => array( 05256 0 => 'feature_relationshipprop_id', 05257 ), 05258 'unique keys' => array( 05259 'feature_relationshipprop_c1' => array( 05260 0 => 'feature_relationship_id', 05261 1 => 'type_id', 05262 2 => 'rank', 05263 ), 05264 ), 05265 'indexes' => array( 05266 'feature_relationshipprop_idx1' => array( 05267 0 => 'feature_relationship_id', 05268 ), 05269 'feature_relationshipprop_idx2' => array( 05270 0 => 'type_id', 05271 ), 05272 ), 05273 'foreign keys' => array( 05274 'cvterm' => array( 05275 'table' => 'cvterm', 05276 'columns' => array( 05277 'type_id' => 'cvterm_id', 05278 ), 05279 ), 05280 'feature_relationship' => array( 05281 'table' => 'feature_relationship', 05282 'columns' => array( 05283 'feature_relationship_id' => 'feature_relationship_id', 05284 ), 05285 ), 05286 ), 05287 ); 05288 return $description; 05289 } 05303 function tripal_core_chado_schema_v1_11_feature_relationshipprop_pub() { 05304 $description = array( 05305 'table' => 'feature_relationshipprop_pub', 05306 'fields' => array( 05307 'feature_relationshipprop_pub_id' => array( 05308 'type' => 'serial', 05309 'not NULL' => '1', 05310 ), 05311 'feature_relationshipprop_id' => array( 05312 'type' => 'int', 05313 'not NULL' => '1', 05314 ), 05315 'pub_id' => array( 05316 'type' => 'int', 05317 'not NULL' => '1', 05318 ), 05319 ), 05320 'primary key' => array( 05321 0 => 'feature_relationshipprop_pub_id', 05322 ), 05323 'unique keys' => array( 05324 'feature_relationshipprop_pub_c1' => array( 05325 0 => 'feature_relationshipprop_id', 05326 1 => 'pub_id', 05327 ), 05328 ), 05329 'indexes' => array( 05330 'feature_relationshipprop_pub_idx1' => array( 05331 0 => 'feature_relationshipprop_id', 05332 ), 05333 'feature_relationshipprop_pub_idx2' => array( 05334 0 => 'pub_id', 05335 ), 05336 ), 05337 'foreign keys' => array( 05338 'feature_relationshipprop' => array( 05339 'table' => 'feature_relationshipprop', 05340 'columns' => array( 05341 'feature_relationshipprop_id' => 'feature_relationshipprop_id', 05342 ), 05343 ), 05344 'pub' => array( 05345 'table' => 'pub', 05346 'columns' => array( 05347 'pub_id' => 'pub_id', 05348 ), 05349 ), 05350 ), 05351 ); 05352 return $description; 05353 } 05367 function tripal_core_chado_schema_v1_11_feature_synonym() { 05368 $description = array( 05369 'table' => 'feature_synonym', 05370 'fields' => array( 05371 'feature_synonym_id' => array( 05372 'type' => 'serial', 05373 'not NULL' => '1', 05374 ), 05375 'synonym_id' => array( 05376 'type' => 'int', 05377 'not NULL' => '1', 05378 ), 05379 'feature_id' => array( 05380 'type' => 'int', 05381 'not NULL' => '1', 05382 ), 05383 'pub_id' => array( 05384 'type' => 'int', 05385 'not NULL' => '1', 05386 ), 05387 'is_current' => array( 05388 'type' => 'boolean', 05389 'not NULL' => '1', 05390 'default' => 'als', 05391 ), 05392 'is_internal' => array( 05393 'type' => 'boolean', 05394 'not NULL' => '1', 05395 'default' => 'als', 05396 ), 05397 ), 05398 'primary key' => array( 05399 0 => 'feature_synonym_id', 05400 ), 05401 'unique keys' => array( 05402 'feature_synonym_c1' => array( 05403 0 => 'synonym_id', 05404 1 => 'feature_id', 05405 2 => 'pub_id', 05406 ), 05407 ), 05408 'indexes' => array( 05409 'feature_synonym_idx1' => array( 05410 0 => 'synonym_id', 05411 ), 05412 'feature_synonym_idx2' => array( 05413 0 => 'feature_id', 05414 ), 05415 'feature_synonym_idx3' => array( 05416 0 => 'pub_id', 05417 ), 05418 ), 05419 'foreign keys' => array( 05420 'feature' => array( 05421 'table' => 'feature', 05422 'columns' => array( 05423 'feature_id' => 'feature_id', 05424 ), 05425 ), 05426 'synonym' => array( 05427 'table' => 'synonym', 05428 'columns' => array( 05429 'synonym_id' => 'synonym_id', 05430 ), 05431 ), 05432 'pub' => array( 05433 'table' => 'pub', 05434 'columns' => array( 05435 'pub_id' => 'pub_id', 05436 ), 05437 ), 05438 ), 05439 ); 05440 return $description; 05441 } 05455 function tripal_core_chado_schema_v1_11_featureloc() { 05456 $description = array( 05457 'table' => 'featureloc', 05458 'fields' => array( 05459 'featureloc_id' => array( 05460 'type' => 'serial', 05461 'not NULL' => '1', 05462 ), 05463 'feature_id' => array( 05464 'type' => 'int', 05465 'not NULL' => '1', 05466 ), 05467 'srcfeature_id' => array( 05468 'type' => 'int', 05469 'not NULL' => '', 05470 ), 05471 'fmin' => array( 05472 'type' => 'int', 05473 'not NULL' => '', 05474 ), 05475 'is_fmin_partial' => array( 05476 'type' => 'boolean', 05477 'not NULL' => '1', 05478 'default' => 'als', 05479 ), 05480 'fmax' => array( 05481 'type' => 'int', 05482 'not NULL' => '', 05483 ), 05484 'is_fmax_partial' => array( 05485 'type' => 'boolean', 05486 'not NULL' => '1', 05487 'default' => 'als', 05488 ), 05489 'strand' => array( 05490 'type' => 'int', 05491 'size' => 'small', 05492 'not NULL' => '', 05493 ), 05494 'phase' => array( 05495 'type' => 'int', 05496 'not NULL' => '', 05497 ), 05498 'residue_info' => array( 05499 'type' => 'text', 05500 'not NULL' => '', 05501 ), 05502 'locgroup' => array( 05503 'type' => 'int', 05504 'not NULL' => '1', 05505 'default' => '0', 05506 ), 05507 'rank' => array( 05508 'type' => 'int', 05509 'not NULL' => '1', 05510 'default' => '0', 05511 ), 05512 ), 05513 'primary key' => array( 05514 0 => 'featureloc_id', 05515 ), 05516 'unique keys' => array( 05517 'featureloc_c1' => array( 05518 0 => 'feature_id', 05519 1 => 'locgroup', 05520 2 => 'rank', 05521 ), 05522 ), 05523 'indexes' => array( 05524 'binloc_boxrange' => array( 05525 0 => 'fmin', 05526 ), 05527 'binloc_boxrange_src' => array( 05528 0 => 'srcfeature_id', 05529 1 => 'fmin', 05530 ), 05531 'featureloc_idx1' => array( 05532 0 => 'feature_id', 05533 ), 05534 'featureloc_idx2' => array( 05535 0 => 'srcfeature_id', 05536 ), 05537 'featureloc_idx3' => array( 05538 0 => 'srcfeature_id', 05539 1 => 'fmin', 05540 2 => 'fmax', 05541 ), 05542 ), 05543 'foreign keys' => array( 05544 'feature' => array( 05545 'table' => 'feature', 05546 'columns' => array( 05547 'feature_id' => 'feature_id', 05548 'srcfeature_id' => 'feature_id', 05549 ), 05550 ), 05551 ), 05552 'referring_tables' => array( 05553 0 => 'analysisfeature', 05554 1 => 'featureloc_pub', 05555 ), 05556 ); 05557 return $description; 05558 } 05572 function tripal_core_chado_schema_v1_11_featureloc_pub() { 05573 $description = array( 05574 'table' => 'featureloc_pub', 05575 'fields' => array( 05576 'featureloc_pub_id' => array( 05577 'type' => 'serial', 05578 'not NULL' => '1', 05579 ), 05580 'featureloc_id' => array( 05581 'type' => 'int', 05582 'not NULL' => '1', 05583 ), 05584 'pub_id' => array( 05585 'type' => 'int', 05586 'not NULL' => '1', 05587 ), 05588 ), 05589 'primary key' => array( 05590 0 => 'featureloc_pub_id', 05591 ), 05592 'unique keys' => array( 05593 'featureloc_pub_c1' => array( 05594 0 => 'featureloc_id', 05595 1 => 'pub_id', 05596 ), 05597 ), 05598 'indexes' => array( 05599 'featureloc_pub_idx1' => array( 05600 0 => 'featureloc_id', 05601 ), 05602 'featureloc_pub_idx2' => array( 05603 0 => 'pub_id', 05604 ), 05605 ), 05606 'foreign keys' => array( 05607 'pub' => array( 05608 'table' => 'pub', 05609 'columns' => array( 05610 'pub_id' => 'pub_id', 05611 ), 05612 ), 05613 'featureloc' => array( 05614 'table' => 'featureloc', 05615 'columns' => array( 05616 'featureloc_id' => 'featureloc_id', 05617 ), 05618 ), 05619 ), 05620 ); 05621 return $description; 05622 } 05636 function tripal_core_chado_schema_v1_11_featuremap() { 05637 $description = array( 05638 'table' => 'featuremap', 05639 'fields' => array( 05640 'featuremap_id' => array( 05641 'type' => 'serial', 05642 'not NULL' => '1', 05643 ), 05644 'name' => array( 05645 'type' => 'varchar', 05646 'length' => '255', 05647 'not NULL' => '', 05648 ), 05649 'description' => array( 05650 'type' => 'text', 05651 'not NULL' => '', 05652 ), 05653 'unittype_id' => array( 05654 'type' => 'int', 05655 'not NULL' => '', 05656 ), 05657 ), 05658 'primary key' => array( 05659 0 => 'featuremap_id', 05660 ), 05661 'unique keys' => array( 05662 'featuremap_c1' => array( 05663 0 => 'name', 05664 ), 05665 ), 05666 'indexes' => array( 05667 ), 05668 'foreign keys' => array( 05669 'cvterm' => array( 05670 'table' => 'cvterm', 05671 'columns' => array( 05672 'unittype_id' => 'cvterm_id', 05673 ), 05674 ), 05675 ), 05676 ); 05677 return $description; 05678 } 05692 function tripal_core_chado_schema_v1_11_featuremap_pub() { 05693 $description = array( 05694 'table' => 'featuremap_pub', 05695 'fields' => array( 05696 'featuremap_pub_id' => array( 05697 'type' => 'serial', 05698 'not NULL' => '1', 05699 ), 05700 'featuremap_id' => array( 05701 'type' => 'int', 05702 'not NULL' => '1', 05703 ), 05704 'pub_id' => array( 05705 'type' => 'int', 05706 'not NULL' => '1', 05707 ), 05708 ), 05709 'primary key' => array( 05710 0 => 'featuremap_pub_id', 05711 ), 05712 'unique keys' => array( 05713 ), 05714 'indexes' => array( 05715 'featuremap_pub_idx1' => array( 05716 0 => 'featuremap_id', 05717 ), 05718 'featuremap_pub_idx2' => array( 05719 0 => 'pub_id', 05720 ), 05721 ), 05722 'foreign keys' => array( 05723 'pub' => array( 05724 'table' => 'pub', 05725 'columns' => array( 05726 'pub_id' => 'pub_id', 05727 ), 05728 ), 05729 'featuremap' => array( 05730 'table' => 'featuremap', 05731 'columns' => array( 05732 'featuremap_id' => 'featuremap_id', 05733 ), 05734 ), 05735 ), 05736 ); 05737 return $description; 05738 } 05752 function tripal_core_chado_schema_v1_11_featurepos() { 05753 $description = array( 05754 'table' => 'featurepos', 05755 'fields' => array( 05756 'featurepos_id' => array( 05757 'type' => 'serial', 05758 'not NULL' => '1', 05759 ), 05760 'featuremap_id' => array( 05761 'type' => 'serial', 05762 'not NULL' => '1', 05763 ), 05764 'feature_id' => array( 05765 'type' => 'int', 05766 'not NULL' => '1', 05767 ), 05768 'map_feature_id' => array( 05769 'type' => 'int', 05770 'not NULL' => '1', 05771 ), 05772 'mappos' => array( 05773 'type' => 'float', 05774 'size' => 'big', 05775 'not NULL' => '1', 05776 ), 05777 ), 05778 'primary key' => array( 05779 0 => 'featurepos_id', 05780 ), 05781 'unique keys' => array( 05782 ), 05783 'indexes' => array( 05784 'featurepos_idx1' => array( 05785 0 => 'featuremap_id', 05786 ), 05787 'featurepos_idx2' => array( 05788 0 => 'feature_id', 05789 ), 05790 'featurepos_idx3' => array( 05791 0 => 'map_feature_id', 05792 ), 05793 ), 05794 'foreign keys' => array( 05795 'feature' => array( 05796 'table' => 'feature', 05797 'columns' => array( 05798 'feature_id' => 'feature_id', 05799 'map_feature_id' => 'feature_id', 05800 ), 05801 ), 05802 'featuremap' => array( 05803 'table' => 'featuremap', 05804 'columns' => array( 05805 'featuremap_id' => 'featuremap_id', 05806 ), 05807 ), 05808 ), 05809 ); 05810 return $description; 05811 } 05825 function tripal_core_chado_schema_v1_11_featureprop() { 05826 $description = array( 05827 'table' => 'featureprop', 05828 'fields' => array( 05829 'featureprop_id' => array( 05830 'type' => 'serial', 05831 'not NULL' => '1', 05832 ), 05833 'feature_id' => array( 05834 'type' => 'int', 05835 'not NULL' => '1', 05836 ), 05837 'type_id' => array( 05838 'type' => 'int', 05839 'not NULL' => '1', 05840 ), 05841 'value' => array( 05842 'type' => 'text', 05843 'not NULL' => '', 05844 ), 05845 'rank' => array( 05846 'type' => 'int', 05847 'not NULL' => '1', 05848 'default' => '0', 05849 ), 05850 ), 05851 'primary key' => array( 05852 0 => 'featureprop_id', 05853 ), 05854 'unique keys' => array( 05855 'featureprop_c1' => array( 05856 0 => 'feature_id', 05857 1 => 'type_id', 05858 2 => 'rank', 05859 ), 05860 ), 05861 'indexes' => array( 05862 'featureprop_idx1' => array( 05863 0 => 'feature_id', 05864 ), 05865 'featureprop_idx2' => array( 05866 0 => 'type_id', 05867 ), 05868 ), 05869 'foreign keys' => array( 05870 'feature' => array( 05871 'table' => 'feature', 05872 'columns' => array( 05873 'feature_id' => 'feature_id', 05874 ), 05875 ), 05876 'cvterm' => array( 05877 'table' => 'cvterm', 05878 'columns' => array( 05879 'type_id' => 'cvterm_id', 05880 ), 05881 ), 05882 ), 05883 'referring_tables' => array( 05884 0 => 'analysisfeature', 05885 1 => 'featureprop_pub', 05886 ), 05887 ); 05888 return $description; 05889 } 05903 function tripal_core_chado_schema_v1_11_featureprop_pub() { 05904 $description = array( 05905 'table' => 'featureprop_pub', 05906 'fields' => array( 05907 'featureprop_pub_id' => array( 05908 'type' => 'serial', 05909 'not NULL' => '1', 05910 ), 05911 'featureprop_id' => array( 05912 'type' => 'int', 05913 'not NULL' => '1', 05914 ), 05915 'pub_id' => array( 05916 'type' => 'int', 05917 'not NULL' => '1', 05918 ), 05919 ), 05920 'primary key' => array( 05921 0 => 'featureprop_pub_id', 05922 ), 05923 'unique keys' => array( 05924 'featureprop_pub_c1' => array( 05925 0 => 'featureprop_id', 05926 1 => 'pub_id', 05927 ), 05928 ), 05929 'indexes' => array( 05930 'featureprop_pub_idx1' => array( 05931 0 => 'featureprop_id', 05932 ), 05933 'featureprop_pub_idx2' => array( 05934 0 => 'pub_id', 05935 ), 05936 ), 05937 'foreign keys' => array( 05938 'pub' => array( 05939 'table' => 'pub', 05940 'columns' => array( 05941 'pub_id' => 'pub_id', 05942 ), 05943 ), 05944 'featureprop' => array( 05945 'table' => 'featureprop', 05946 'columns' => array( 05947 'featureprop_id' => 'featureprop_id', 05948 ), 05949 ), 05950 ), 05951 ); 05952 return $description; 05953 } 05967 function tripal_core_chado_schema_v1_11_featurerange() { 05968 $description = array( 05969 'table' => 'featurerange', 05970 'fields' => array( 05971 'featurerange_id' => array( 05972 'type' => 'serial', 05973 'not NULL' => '1', 05974 ), 05975 'featuremap_id' => array( 05976 'type' => 'int', 05977 'not NULL' => '1', 05978 ), 05979 'feature_id' => array( 05980 'type' => 'int', 05981 'not NULL' => '1', 05982 ), 05983 'leftstartf_id' => array( 05984 'type' => 'int', 05985 'not NULL' => '1', 05986 ), 05987 'leftendf_id' => array( 05988 'type' => 'int', 05989 'not NULL' => '', 05990 ), 05991 'rightstartf_id' => array( 05992 'type' => 'int', 05993 'not NULL' => '', 05994 ), 05995 'rightendf_id' => array( 05996 'type' => 'int', 05997 'not NULL' => '1', 05998 ), 05999 'rangestr' => array( 06000 'type' => 'varchar', 06001 'length' => '255', 06002 'not NULL' => '', 06003 ), 06004 ), 06005 'primary key' => array( 06006 0 => 'featurerange_id', 06007 ), 06008 'unique keys' => array( 06009 ), 06010 'indexes' => array( 06011 'featurerange_idx1' => array( 06012 0 => 'featuremap_id', 06013 ), 06014 'featurerange_idx2' => array( 06015 0 => 'feature_id', 06016 ), 06017 'featurerange_idx3' => array( 06018 0 => 'leftstartf_id', 06019 ), 06020 'featurerange_idx4' => array( 06021 0 => 'leftendf_id', 06022 ), 06023 'featurerange_idx5' => array( 06024 0 => 'rightstartf_id', 06025 ), 06026 'featurerange_idx6' => array( 06027 0 => 'rightendf_id', 06028 ), 06029 ), 06030 'foreign keys' => array( 06031 'feature' => array( 06032 'table' => 'feature', 06033 'columns' => array( 06034 'feature_id' => 'feature_id', 06035 'leftstartf_id' => 'feature_id', 06036 'leftendf_id' => 'feature_id', 06037 'rightstartf_id' => 'feature_id', 06038 'rightendf_id' => 'feature_id', 06039 ), 06040 ), 06041 'featuremap' => array( 06042 'table' => 'featuremap', 06043 'columns' => array( 06044 'featuremap_id' => 'featuremap_id', 06045 ), 06046 ), 06047 ), 06048 ); 06049 return $description; 06050 } 06064 function tripal_core_chado_schema_v1_11_genotype() { 06065 $description = array( 06066 'table' => 'genotype', 06067 'fields' => array( 06068 'genotype_id' => array( 06069 'type' => 'serial', 06070 'not NULL' => '1', 06071 ), 06072 'name' => array( 06073 'type' => 'text', 06074 'not NULL' => '', 06075 ), 06076 'uniquename' => array( 06077 'type' => 'text', 06078 'not NULL' => '1', 06079 ), 06080 'description' => array( 06081 'type' => 'varchar', 06082 'length' => '255', 06083 'not NULL' => '', 06084 ), 06085 ), 06086 'primary key' => array( 06087 0 => 'genotype_id', 06088 ), 06089 'unique keys' => array( 06090 'genotype_c1' => array( 06091 0 => 'uniquename', 06092 ), 06093 ), 06094 'indexes' => array( 06095 'genotype_idx1' => array( 06096 0 => 'uniquename', 06097 ), 06098 'genotype_idx2' => array( 06099 0 => 'name', 06100 ), 06101 ), 06102 'foreign keys' => array( 06103 ), 06104 ); 06105 return $description; 06106 } 06120 function tripal_core_chado_schema_v1_11_library() { 06121 $description = array( 06122 'table' => 'library', 06123 'referring_tables' => array( 06124 0 => 'cell_line_library', 06125 1 => 'library_cvterm', 06126 2 => 'library_dbxref', 06127 3 => 'library_feature', 06128 4 => 'library_pub', 06129 5 => 'library_synonym', 06130 6 => 'libraryprop', 06131 ), 06132 'fields' => array( 06133 'library_id' => array( 06134 'type' => 'serial', 06135 'not NULL' => '1', 06136 ), 06137 'organism_id' => array( 06138 'type' => 'int', 06139 'not NULL' => '1', 06140 ), 06141 'name' => array( 06142 'type' => 'varchar', 06143 'length' => '255', 06144 'not NULL' => '', 06145 ), 06146 'uniquename' => array( 06147 'type' => 'text', 06148 'not NULL' => '1', 06149 ), 06150 'type_id' => array( 06151 'type' => 'int', 06152 'not NULL' => '1', 06153 ), 06154 'is_obsolete' => array( 06155 'type' => 'int', 06156 'not NULL' => '1', 06157 'default' => '0', 06158 ), 06159 'timeaccessioned' => array( 06160 'type' => 'datetime', 06161 'not NULL' => '1', 06162 'default' => 'ow(', 06163 ), 06164 'timelastmodified' => array( 06165 'type' => 'datetime', 06166 'not NULL' => '1', 06167 'default' => 'ow(', 06168 ), 06169 ), 06170 'primary key' => array( 06171 0 => 'library_id', 06172 ), 06173 'unique keys' => array( 06174 'library_c1' => array( 06175 0 => 'organism_id', 06176 1 => 'uniquename', 06177 2 => 'type_id', 06178 ), 06179 ), 06180 'indexes' => array( 06181 'library_idx1' => array( 06182 0 => 'organism_id', 06183 ), 06184 'library_idx2' => array( 06185 0 => 'type_id', 06186 ), 06187 'library_idx3' => array( 06188 0 => 'uniquename', 06189 ), 06190 'library_name_ind1' => array( 06191 0 => 'name', 06192 ), 06193 ), 06194 'foreign keys' => array( 06195 'cvterm' => array( 06196 'table' => 'cvterm', 06197 'columns' => array( 06198 'type_id' => 'cvterm_id', 06199 ), 06200 ), 06201 'organism' => array( 06202 'table' => 'organism', 06203 'columns' => array( 06204 'organism_id' => 'organism_id', 06205 ), 06206 ), 06207 ), 06208 ); 06209 return $description; 06210 } 06224 function tripal_core_chado_schema_v1_11_library_cvterm() { 06225 $description = array( 06226 'table' => 'library_cvterm', 06227 'fields' => array( 06228 'library_cvterm_id' => array( 06229 'type' => 'serial', 06230 'not NULL' => '1', 06231 ), 06232 'library_id' => array( 06233 'type' => 'int', 06234 'not NULL' => '1', 06235 ), 06236 'cvterm_id' => array( 06237 'type' => 'int', 06238 'not NULL' => '1', 06239 ), 06240 'pub_id' => array( 06241 'type' => 'int', 06242 'not NULL' => '1', 06243 ), 06244 ), 06245 'primary key' => array( 06246 0 => 'library_cvterm_id', 06247 ), 06248 'unique keys' => array( 06249 'library_cvterm_c1' => array( 06250 0 => 'library_id', 06251 1 => 'cvterm_id', 06252 2 => 'pub_id', 06253 ), 06254 ), 06255 'indexes' => array( 06256 'library_cvterm_idx1' => array( 06257 0 => 'library_id', 06258 ), 06259 'library_cvterm_idx2' => array( 06260 0 => 'cvterm_id', 06261 ), 06262 'library_cvterm_idx3' => array( 06263 0 => 'pub_id', 06264 ), 06265 ), 06266 'foreign keys' => array( 06267 'cvterm' => array( 06268 'table' => 'cvterm', 06269 'columns' => array( 06270 'cvterm_id' => 'cvterm_id', 06271 ), 06272 ), 06273 'pub' => array( 06274 'table' => 'pub', 06275 'columns' => array( 06276 'pub_id' => 'pub_id', 06277 ), 06278 ), 06279 'library' => array( 06280 'table' => 'library', 06281 'columns' => array( 06282 'library_id' => 'library_id', 06283 ), 06284 ), 06285 ), 06286 ); 06287 return $description; 06288 } 06302 function tripal_core_chado_schema_v1_11_library_dbxref() { 06303 $description = array( 06304 'table' => 'library_dbxref', 06305 'fields' => array( 06306 'library_dbxref_id' => array( 06307 'type' => 'serial', 06308 'not NULL' => '1', 06309 ), 06310 'library_id' => array( 06311 'type' => 'int', 06312 'not NULL' => '1', 06313 ), 06314 'dbxref_id' => array( 06315 'type' => 'int', 06316 'not NULL' => '1', 06317 ), 06318 'is_current' => array( 06319 'type' => 'boolean', 06320 'not NULL' => '1', 06321 'default' => 'ru', 06322 ), 06323 ), 06324 'primary key' => array( 06325 0 => 'library_dbxref_id', 06326 ), 06327 'unique keys' => array( 06328 'library_dbxref_c1' => array( 06329 0 => 'library_id', 06330 1 => 'dbxref_id', 06331 ), 06332 ), 06333 'indexes' => array( 06334 'library_dbxref_idx1' => array( 06335 0 => 'library_id', 06336 ), 06337 'library_dbxref_idx2' => array( 06338 0 => 'dbxref_id', 06339 ), 06340 ), 06341 'foreign keys' => array( 06342 'dbxref' => array( 06343 'table' => 'dbxref', 06344 'columns' => array( 06345 'dbxref_id' => 'dbxref_id', 06346 ), 06347 ), 06348 'library' => array( 06349 'table' => 'library', 06350 'columns' => array( 06351 'library_id' => 'library_id', 06352 ), 06353 ), 06354 ), 06355 ); 06356 return $description; 06357 } 06371 function tripal_core_chado_schema_v1_11_library_feature() { 06372 $description = array( 06373 'table' => 'library_feature', 06374 'fields' => array( 06375 'library_feature_id' => array( 06376 'type' => 'serial', 06377 'not NULL' => '1', 06378 ), 06379 'library_id' => array( 06380 'type' => 'int', 06381 'not NULL' => '1', 06382 ), 06383 'feature_id' => array( 06384 'type' => 'int', 06385 'not NULL' => '1', 06386 ), 06387 ), 06388 'primary key' => array( 06389 0 => 'library_feature_id', 06390 ), 06391 'unique keys' => array( 06392 'library_feature_c1' => array( 06393 0 => 'library_id', 06394 1 => 'feature_id', 06395 ), 06396 ), 06397 'indexes' => array( 06398 'library_feature_idx1' => array( 06399 0 => 'library_id', 06400 ), 06401 'library_feature_idx2' => array( 06402 0 => 'feature_id', 06403 ), 06404 ), 06405 'foreign keys' => array( 06406 'feature' => array( 06407 'table' => 'feature', 06408 'columns' => array( 06409 'feature_id' => 'feature_id', 06410 ), 06411 ), 06412 'library' => array( 06413 'table' => 'library', 06414 'columns' => array( 06415 'library_id' => 'library_id', 06416 ), 06417 ), 06418 ), 06419 ); 06420 return $description; 06421 } 06435 function tripal_core_chado_schema_v1_11_library_pub() { 06436 $description = array( 06437 'table' => 'library_pub', 06438 'fields' => array( 06439 'library_pub_id' => array( 06440 'type' => 'serial', 06441 'not NULL' => '1', 06442 ), 06443 'library_id' => array( 06444 'type' => 'int', 06445 'not NULL' => '1', 06446 ), 06447 'pub_id' => array( 06448 'type' => 'int', 06449 'not NULL' => '1', 06450 ), 06451 ), 06452 'primary key' => array( 06453 0 => 'library_pub_id', 06454 ), 06455 'unique keys' => array( 06456 'library_pub_c1' => array( 06457 0 => 'library_id', 06458 1 => 'pub_id', 06459 ), 06460 ), 06461 'indexes' => array( 06462 'library_pub_idx1' => array( 06463 0 => 'library_id', 06464 ), 06465 'library_pub_idx2' => array( 06466 0 => 'pub_id', 06467 ), 06468 ), 06469 'foreign keys' => array( 06470 'pub' => array( 06471 'table' => 'pub', 06472 'columns' => array( 06473 'pub_id' => 'pub_id', 06474 ), 06475 ), 06476 'library' => array( 06477 'table' => 'library', 06478 'columns' => array( 06479 'library_id' => 'library_id', 06480 ), 06481 ), 06482 ), 06483 ); 06484 return $description; 06485 } 06499 function tripal_core_chado_schema_v1_11_library_synonym() { 06500 $description = array( 06501 'table' => 'library_synonym', 06502 'fields' => array( 06503 'library_synonym_id' => array( 06504 'type' => 'serial', 06505 'not NULL' => '1', 06506 ), 06507 'synonym_id' => array( 06508 'type' => 'int', 06509 'not NULL' => '1', 06510 ), 06511 'library_id' => array( 06512 'type' => 'int', 06513 'not NULL' => '1', 06514 ), 06515 'pub_id' => array( 06516 'type' => 'int', 06517 'not NULL' => '1', 06518 ), 06519 'is_current' => array( 06520 'type' => 'boolean', 06521 'not NULL' => '1', 06522 'default' => 'ru', 06523 ), 06524 'is_internal' => array( 06525 'type' => 'boolean', 06526 'not NULL' => '1', 06527 'default' => 'als', 06528 ), 06529 ), 06530 'primary key' => array( 06531 0 => 'library_synonym_id', 06532 ), 06533 'unique keys' => array( 06534 'library_synonym_c1' => array( 06535 0 => 'synonym_id', 06536 1 => 'library_id', 06537 2 => 'pub_id', 06538 ), 06539 ), 06540 'indexes' => array( 06541 'library_synonym_idx1' => array( 06542 0 => 'synonym_id', 06543 ), 06544 'library_synonym_idx2' => array( 06545 0 => 'library_id', 06546 ), 06547 'library_synonym_idx3' => array( 06548 0 => 'pub_id', 06549 ), 06550 ), 06551 'foreign keys' => array( 06552 'pub' => array( 06553 'table' => 'pub', 06554 'columns' => array( 06555 'pub_id' => 'pub_id', 06556 ), 06557 ), 06558 'synonym' => array( 06559 'table' => 'synonym', 06560 'columns' => array( 06561 'synonym_id' => 'synonym_id', 06562 ), 06563 ), 06564 'library' => array( 06565 'table' => 'library', 06566 'columns' => array( 06567 'library_id' => 'library_id', 06568 ), 06569 ), 06570 ), 06571 ); 06572 return $description; 06573 } 06587 function tripal_core_chado_schema_v1_11_libraryprop() { 06588 $description = array( 06589 'table' => 'libraryprop', 06590 'fields' => array( 06591 'libraryprop_id' => array( 06592 'type' => 'serial', 06593 'not NULL' => '1', 06594 ), 06595 'library_id' => array( 06596 'type' => 'int', 06597 'not NULL' => '1', 06598 ), 06599 'type_id' => array( 06600 'type' => 'int', 06601 'not NULL' => '1', 06602 ), 06603 'value' => array( 06604 'type' => 'text', 06605 'not NULL' => '', 06606 ), 06607 'rank' => array( 06608 'type' => 'int', 06609 'not NULL' => '1', 06610 'default' => '0', 06611 ), 06612 ), 06613 'primary key' => array( 06614 0 => 'libraryprop_id', 06615 ), 06616 'unique keys' => array( 06617 'libraryprop_c1' => array( 06618 0 => 'library_id', 06619 1 => 'type_id', 06620 2 => 'rank', 06621 ), 06622 ), 06623 'indexes' => array( 06624 'libraryprop_idx1' => array( 06625 0 => 'library_id', 06626 ), 06627 'libraryprop_idx2' => array( 06628 0 => 'type_id', 06629 ), 06630 ), 06631 'foreign keys' => array( 06632 'cvterm' => array( 06633 'table' => 'cvterm', 06634 'columns' => array( 06635 'type_id' => 'cvterm_id', 06636 ), 06637 ), 06638 'library' => array( 06639 'table' => 'library', 06640 'columns' => array( 06641 'library_id' => 'library_id', 06642 ), 06643 ), 06644 ), 06645 ); 06646 return $description; 06647 } 06661 function tripal_core_chado_schema_v1_11_libraryprop_pub() { 06662 $description = array( 06663 'table' => 'libraryprop_pub', 06664 'fields' => array( 06665 'libraryprop_pub_id' => array( 06666 'type' => 'serial', 06667 'not NULL' => '1', 06668 ), 06669 'libraryprop_id' => array( 06670 'type' => 'int', 06671 'not NULL' => '1', 06672 ), 06673 'pub_id' => array( 06674 'type' => 'int', 06675 'not NULL' => '1', 06676 ), 06677 ), 06678 'primary key' => array( 06679 0 => 'libraryprop_pub_id', 06680 ), 06681 'unique keys' => array( 06682 'libraryprop_pub_c1' => array( 06683 0 => 'libraryprop_id', 06684 1 => 'pub_id', 06685 ), 06686 ), 06687 'indexes' => array( 06688 'libraryprop_pub_idx1' => array( 06689 0 => 'libraryprop_id', 06690 ), 06691 'libraryprop_pub_idx2' => array( 06692 0 => 'pub_id', 06693 ), 06694 ), 06695 'foreign keys' => array( 06696 'pub' => array( 06697 'table' => 'pub', 06698 'columns' => array( 06699 'pub_id' => 'pub_id', 06700 ), 06701 ), 06702 'libraryprop' => array( 06703 'table' => 'libraryprop', 06704 'columns' => array( 06705 'libraryprop_id' => 'libraryprop_id', 06706 ), 06707 ), 06708 ), 06709 ); 06710 return $description; 06711 } 06725 function tripal_core_chado_schema_v1_11_magedocumentation() { 06726 $description = array( 06727 'table' => 'magedocumentation', 06728 'fields' => array( 06729 'magedocumentation_id' => array( 06730 'type' => 'serial', 06731 'not NULL' => '1', 06732 ), 06733 'mageml_id' => array( 06734 'type' => 'int', 06735 'not NULL' => '1', 06736 ), 06737 'tableinfo_id' => array( 06738 'type' => 'int', 06739 'not NULL' => '1', 06740 ), 06741 'row_id' => array( 06742 'type' => 'int', 06743 'not NULL' => '1', 06744 ), 06745 'mageidentifier' => array( 06746 'type' => 'text', 06747 'not NULL' => '1', 06748 ), 06749 ), 06750 'primary key' => array( 06751 0 => 'magedocumentation_id', 06752 ), 06753 'unique keys' => array( 06754 ), 06755 'indexes' => array( 06756 'magedocumentation_idx1' => array( 06757 0 => 'mageml_id', 06758 ), 06759 'magedocumentation_idx2' => array( 06760 0 => 'tableinfo_id', 06761 ), 06762 'magedocumentation_idx3' => array( 06763 0 => 'row_id', 06764 ), 06765 ), 06766 'foreign keys' => array( 06767 'tableinfo' => array( 06768 'table' => 'tableinfo', 06769 'columns' => array( 06770 'tableinfo_id' => 'tableinfo_id', 06771 ), 06772 ), 06773 'mageml' => array( 06774 'table' => 'mageml', 06775 'columns' => array( 06776 'mageml_id' => 'mageml_id', 06777 ), 06778 ), 06779 ), 06780 ); 06781 return $description; 06782 } 06796 function tripal_core_chado_schema_v1_11_mageml() { 06797 $description = array( 06798 'table' => 'mageml', 06799 'fields' => array( 06800 'mageml_id' => array( 06801 'type' => 'serial', 06802 'not NULL' => '1', 06803 ), 06804 'mage_package' => array( 06805 'type' => 'text', 06806 'not NULL' => '1', 06807 ), 06808 'mage_ml' => array( 06809 'type' => 'text', 06810 'not NULL' => '1', 06811 ), 06812 ), 06813 'primary key' => array( 06814 0 => 'mageml_id', 06815 ), 06816 'unique keys' => array( 06817 ), 06818 'indexes' => array( 06819 ), 06820 'foreign keys' => array( 06821 ), 06822 ); 06823 return $description; 06824 } 06838 function tripal_core_chado_schema_v1_11_materialized_view() { 06839 $description = array( 06840 'table' => 'materialized_view', 06841 'fields' => array( 06842 'materialized_view_id' => array( 06843 'type' => 'serial', 06844 'not NULL' => '1', 06845 ), 06846 'last_update' => array( 06847 'type' => 'datetime', 06848 'not NULL' => '', 06849 ), 06850 'refresh_time' => array( 06851 'type' => 'int', 06852 'not NULL' => '', 06853 ), 06854 'name' => array( 06855 'type' => 'varchar', 06856 'length' => '64', 06857 'not NULL' => '', 06858 ), 06859 'mv_schema' => array( 06860 'type' => 'varchar', 06861 'length' => '64', 06862 'not NULL' => '', 06863 ), 06864 'mv_table' => array( 06865 'type' => 'varchar', 06866 'length' => '128', 06867 'not NULL' => '', 06868 ), 06869 'mv_specs' => array( 06870 'type' => 'text', 06871 'not NULL' => '', 06872 ), 06873 'indexed' => array( 06874 'type' => 'text', 06875 'not NULL' => '', 06876 ), 06877 'query' => array( 06878 'type' => 'text', 06879 'not NULL' => '', 06880 ), 06881 'special_index' => array( 06882 'type' => 'text', 06883 'not NULL' => '', 06884 ), 06885 ), 06886 'primary key' => array( 06887 ), 06888 'unique keys' => array( 06889 'name' => array( 06890 0 => 'name', 06891 ), 06892 ), 06893 'indexes' => array( 06894 ), 06895 'foreign keys' => array( 06896 ), 06897 ); 06898 return $description; 06899 } 06913 function tripal_core_chado_schema_v1_11_organism() { 06914 $description = array( 06915 'table' => 'organism', 06916 'fields' => array( 06917 'organism_id' => array( 06918 'type' => 'serial', 06919 'not NULL' => '1', 06920 ), 06921 'abbreviation' => array( 06922 'type' => 'varchar', 06923 'length' => '255', 06924 'not NULL' => '', 06925 ), 06926 'genus' => array( 06927 'type' => 'varchar', 06928 'length' => '255', 06929 'not NULL' => '1', 06930 ), 06931 'species' => array( 06932 'type' => 'varchar', 06933 'length' => '255', 06934 'not NULL' => '1', 06935 ), 06936 'common_name' => array( 06937 'type' => 'varchar', 06938 'length' => '255', 06939 'not NULL' => '', 06940 ), 06941 'comment' => array( 06942 'type' => 'text', 06943 'not NULL' => '', 06944 ), 06945 ), 06946 'primary key' => array( 06947 0 => 'organism_id', 06948 ), 06949 'unique keys' => array( 06950 'organism_c1' => array( 06951 0 => 'genus', 06952 1 => 'species', 06953 ), 06954 ), 06955 'indexes' => array( 06956 ), 06957 'foreign keys' => array( 06958 ), 06959 'referring_tables' => array( 06960 0 => 'biomaterial', 06961 1 => 'feature', 06962 2 => 'library', 06963 3 => 'organism_dbxref', 06964 4 => 'organismprop', 06965 5 => 'phylonode_organism', 06966 6 => 'stock', 06967 7 => 'wwwuser_organism', 06968 ), 06969 ); 06970 return $description; 06971 } 06985 function tripal_core_chado_schema_v1_11_organism_dbxref() { 06986 $description = array( 06987 'table' => 'organism_dbxref', 06988 'fields' => array( 06989 'organism_dbxref_id' => array( 06990 'type' => 'serial', 06991 'not NULL' => '1', 06992 ), 06993 'organism_id' => array( 06994 'type' => 'int', 06995 'not NULL' => '1', 06996 ), 06997 'dbxref_id' => array( 06998 'type' => 'int', 06999 'not NULL' => '1', 07000 ), 07001 ), 07002 'primary key' => array( 07003 0 => 'organism_dbxref_id', 07004 ), 07005 'unique keys' => array( 07006 'organism_dbxref_c1' => array( 07007 0 => 'organism_id', 07008 1 => 'dbxref_id', 07009 ), 07010 ), 07011 'indexes' => array( 07012 'organism_dbxref_idx1' => array( 07013 0 => 'organism_id', 07014 ), 07015 'organism_dbxref_idx2' => array( 07016 0 => 'dbxref_id', 07017 ), 07018 ), 07019 'foreign keys' => array( 07020 'dbxref' => array( 07021 'table' => 'dbxref', 07022 'columns' => array( 07023 'dbxref_id' => 'dbxref_id', 07024 ), 07025 ), 07026 'organism' => array( 07027 'table' => 'organism', 07028 'columns' => array( 07029 'organism_id' => 'organism_id', 07030 ), 07031 ), 07032 ), 07033 ); 07034 return $description; 07035 } 07049 function tripal_core_chado_schema_v1_11_organismprop() { 07050 $description = array( 07051 'table' => 'organismprop', 07052 'fields' => array( 07053 'organismprop_id' => array( 07054 'type' => 'serial', 07055 'not NULL' => '1', 07056 ), 07057 'organism_id' => array( 07058 'type' => 'int', 07059 'not NULL' => '1', 07060 ), 07061 'type_id' => array( 07062 'type' => 'int', 07063 'not NULL' => '1', 07064 ), 07065 'value' => array( 07066 'type' => 'text', 07067 'not NULL' => '', 07068 ), 07069 'rank' => array( 07070 'type' => 'int', 07071 'not NULL' => '1', 07072 'default' => '0', 07073 ), 07074 ), 07075 'primary key' => array( 07076 0 => 'organismprop_id', 07077 ), 07078 'unique keys' => array( 07079 'organismprop_c1' => array( 07080 0 => 'organism_id', 07081 1 => 'type_id', 07082 2 => 'rank', 07083 ), 07084 ), 07085 'indexes' => array( 07086 'organismprop_idx1' => array( 07087 0 => 'organism_id', 07088 ), 07089 'organismprop_idx2' => array( 07090 0 => 'type_id', 07091 ), 07092 ), 07093 'foreign keys' => array( 07094 'cvterm' => array( 07095 'table' => 'cvterm', 07096 'columns' => array( 07097 'type_id' => 'cvterm_id', 07098 ), 07099 ), 07100 'organism' => array( 07101 'table' => 'organism', 07102 'columns' => array( 07103 'organism_id' => 'organism_id', 07104 ), 07105 ), 07106 ), 07107 ); 07108 return $description; 07109 } 07123 function tripal_core_chado_schema_v1_11_phendesc() { 07124 $description = array( 07125 'table' => 'phendesc', 07126 'fields' => array( 07127 'phendesc_id' => array( 07128 'type' => 'serial', 07129 'not NULL' => '1', 07130 ), 07131 'genotype_id' => array( 07132 'type' => 'int', 07133 'not NULL' => '1', 07134 ), 07135 'environment_id' => array( 07136 'type' => 'int', 07137 'not NULL' => '1', 07138 ), 07139 'description' => array( 07140 'type' => 'text', 07141 'not NULL' => '1', 07142 ), 07143 'type_id' => array( 07144 'type' => 'int', 07145 'not NULL' => '1', 07146 ), 07147 'pub_id' => array( 07148 'type' => 'int', 07149 'not NULL' => '1', 07150 ), 07151 ), 07152 'primary key' => array( 07153 0 => 'phendesc_id', 07154 ), 07155 'unique keys' => array( 07156 'phendesc_c1' => array( 07157 0 => 'genotype_id', 07158 1 => 'environment_id', 07159 2 => 'type_id', 07160 3 => 'pub_id', 07161 ), 07162 ), 07163 'indexes' => array( 07164 'phendesc_idx1' => array( 07165 0 => 'genotype_id', 07166 ), 07167 'phendesc_idx2' => array( 07168 0 => 'environment_id', 07169 ), 07170 'phendesc_idx3' => array( 07171 0 => 'pub_id', 07172 ), 07173 ), 07174 'foreign keys' => array( 07175 'cvterm' => array( 07176 'table' => 'cvterm', 07177 'columns' => array( 07178 'type_id' => 'cvterm_id', 07179 ), 07180 ), 07181 'pub' => array( 07182 'table' => 'pub', 07183 'columns' => array( 07184 'pub_id' => 'pub_id', 07185 ), 07186 ), 07187 'genotype' => array( 07188 'table' => 'genotype', 07189 'columns' => array( 07190 'genotype_id' => 'genotype_id', 07191 ), 07192 ), 07193 'environment' => array( 07194 'table' => 'environment', 07195 'columns' => array( 07196 'environment_id' => 'environment_id', 07197 ), 07198 ), 07199 ), 07200 ); 07201 return $description; 07202 } 07216 function tripal_core_chado_schema_v1_11_phenotype() { 07217 $description = array( 07218 'table' => 'phenotype', 07219 'fields' => array( 07220 'phenotype_id' => array( 07221 'type' => 'serial', 07222 'not NULL' => '1', 07223 ), 07224 'uniquename' => array( 07225 'type' => 'text', 07226 'not NULL' => '1', 07227 ), 07228 'observable_id' => array( 07229 'type' => 'int', 07230 'not NULL' => '', 07231 ), 07232 'attr_id' => array( 07233 'type' => 'int', 07234 'not NULL' => '', 07235 ), 07236 'value' => array( 07237 'type' => 'text', 07238 'not NULL' => '', 07239 ), 07240 'cvalue_id' => array( 07241 'type' => 'int', 07242 'not NULL' => '', 07243 ), 07244 'assay_id' => array( 07245 'type' => 'int', 07246 'not NULL' => '', 07247 ), 07248 ), 07249 'primary key' => array( 07250 0 => 'phenotype_id', 07251 ), 07252 'unique keys' => array( 07253 'phenotype_c1' => array( 07254 0 => 'uniquename', 07255 ), 07256 ), 07257 'indexes' => array( 07258 'phenotype_idx1' => array( 07259 0 => 'cvalue_id', 07260 ), 07261 'phenotype_idx2' => array( 07262 0 => 'observable_id', 07263 ), 07264 'phenotype_idx3' => array( 07265 0 => 'attr_id', 07266 ), 07267 ), 07268 'foreign keys' => array( 07269 'cvterm' => array( 07270 'table' => 'cvterm', 07271 'columns' => array( 07272 'observable_id' => 'cvterm_id', 07273 'attr_id' => 'cvterm_id', 07274 'cvalue_id' => 'cvterm_id', 07275 'assay_id' => 'cvterm_id', 07276 ), 07277 ), 07278 ), 07279 ); 07280 return $description; 07281 } 07295 function tripal_core_chado_schema_v1_11_phenotype_comparison() { 07296 $description = array( 07297 'table' => 'phenotype_comparison', 07298 'fields' => array( 07299 'phenotype_comparison_id' => array( 07300 'type' => 'serial', 07301 'not NULL' => '1', 07302 ), 07303 'genotype1_id' => array( 07304 'type' => 'int', 07305 'not NULL' => '1', 07306 ), 07307 'environment1_id' => array( 07308 'type' => 'int', 07309 'not NULL' => '1', 07310 ), 07311 'genotype2_id' => array( 07312 'type' => 'int', 07313 'not NULL' => '1', 07314 ), 07315 'environment2_id' => array( 07316 'type' => 'int', 07317 'not NULL' => '1', 07318 ), 07319 'phenotype1_id' => array( 07320 'type' => 'int', 07321 'not NULL' => '1', 07322 ), 07323 'phenotype2_id' => array( 07324 'type' => 'int', 07325 'not NULL' => '', 07326 ), 07327 'pub_id' => array( 07328 'type' => 'int', 07329 'not NULL' => '1', 07330 ), 07331 'organism_id' => array( 07332 'type' => 'int', 07333 'not NULL' => '1', 07334 ), 07335 ), 07336 'primary key' => array( 07337 0 => 'phenotype_comparison_id', 07338 ), 07339 'unique keys' => array( 07340 'phenotype_comparison_c1' => array( 07341 0 => 'genotype1_id', 07342 1 => 'environment1_id', 07343 2 => 'genotype2_id', 07344 3 => 'environment2_id', 07345 4 => 'phenotype1_id', 07346 5 => 'pub_id', 07347 ), 07348 ), 07349 'indexes' => array( 07350 'phenotype_comparison_idx1' => array( 07351 0 => 'genotype1_id', 07352 ), 07353 'phenotype_comparison_idx2' => array( 07354 0 => 'genotype2_id', 07355 ), 07356 'phenotype_comparison_idx4' => array( 07357 0 => 'pub_id', 07358 ), 07359 ), 07360 'foreign keys' => array( 07361 'pub' => array( 07362 'table' => 'pub', 07363 'columns' => array( 07364 'pub_id' => 'pub_id', 07365 ), 07366 ), 07367 'organism' => array( 07368 'table' => 'organism', 07369 'columns' => array( 07370 'organism_id' => 'organism_id', 07371 ), 07372 ), 07373 'phenotype' => array( 07374 'table' => 'phenotype', 07375 'columns' => array( 07376 'phenotype1_id' => 'phenotype_id', 07377 'phenotype2_id' => 'phenotype_id', 07378 ), 07379 ), 07380 'genotype' => array( 07381 'table' => 'genotype', 07382 'columns' => array( 07383 'genotype1_id' => 'genotype_id', 07384 'genotype2_id' => 'genotype_id', 07385 ), 07386 ), 07387 'environment' => array( 07388 'table' => 'environment', 07389 'columns' => array( 07390 'environment1_id' => 'environment_id', 07391 'environment2_id' => 'environment_id', 07392 ), 07393 ), 07394 ), 07395 ); 07396 return $description; 07397 } 07411 function tripal_core_chado_schema_v1_11_phenotype_comparison_cvterm() { 07412 $description = array( 07413 'table' => 'phenotype_comparison_cvterm', 07414 'fields' => array( 07415 'phenotype_comparison_cvterm_id' => array( 07416 'type' => 'serial', 07417 'not NULL' => '1', 07418 ), 07419 'phenotype_comparison_id' => array( 07420 'type' => 'int', 07421 'not NULL' => '1', 07422 ), 07423 'cvterm_id' => array( 07424 'type' => 'int', 07425 'not NULL' => '1', 07426 ), 07427 'pub_id' => array( 07428 'type' => 'int', 07429 'not NULL' => '1', 07430 ), 07431 'rank' => array( 07432 'type' => 'int', 07433 'not NULL' => '1', 07434 'default' => '0', 07435 ), 07436 ), 07437 'primary key' => array( 07438 0 => 'phenotype_comparison_cvterm_id', 07439 ), 07440 'unique keys' => array( 07441 'phenotype_comparison_cvterm_c1' => array( 07442 0 => 'phenotype_comparison_id', 07443 1 => 'cvterm_id', 07444 ), 07445 ), 07446 'indexes' => array( 07447 'phenotype_comparison_cvterm_idx1' => array( 07448 0 => 'phenotype_comparison_id', 07449 ), 07450 'phenotype_comparison_cvterm_idx2' => array( 07451 0 => 'cvterm_id', 07452 ), 07453 ), 07454 'foreign keys' => array( 07455 'cvterm' => array( 07456 'table' => 'cvterm', 07457 'columns' => array( 07458 'cvterm_id' => 'cvterm_id', 07459 ), 07460 ), 07461 'pub' => array( 07462 'table' => 'pub', 07463 'columns' => array( 07464 'pub_id' => 'pub_id', 07465 ), 07466 ), 07467 'phenotype_comparison' => array( 07468 'table' => 'phenotype_comparison', 07469 'columns' => array( 07470 'phenotype_comparison_id' => 'phenotype_comparison_id', 07471 ), 07472 ), 07473 ), 07474 ); 07475 return $description; 07476 } 07490 function tripal_core_chado_schema_v1_11_phenotype_cvterm() { 07491 $description = array( 07492 'table' => 'phenotype_cvterm', 07493 'fields' => array( 07494 'phenotype_cvterm_id' => array( 07495 'type' => 'serial', 07496 'not NULL' => '1', 07497 ), 07498 'phenotype_id' => array( 07499 'type' => 'int', 07500 'not NULL' => '1', 07501 ), 07502 'cvterm_id' => array( 07503 'type' => 'int', 07504 'not NULL' => '1', 07505 ), 07506 'rank' => array( 07507 'type' => 'int', 07508 'not NULL' => '1', 07509 'default' => '0', 07510 ), 07511 ), 07512 'primary key' => array( 07513 0 => 'phenotype_cvterm_id', 07514 ), 07515 'unique keys' => array( 07516 'phenotype_cvterm_c1' => array( 07517 0 => 'phenotype_id', 07518 1 => 'cvterm_id', 07519 2 => 'rank', 07520 ), 07521 ), 07522 'indexes' => array( 07523 'phenotype_cvterm_idx1' => array( 07524 0 => 'phenotype_id', 07525 ), 07526 'phenotype_cvterm_idx2' => array( 07527 0 => 'cvterm_id', 07528 ), 07529 ), 07530 'foreign keys' => array( 07531 'cvterm' => array( 07532 'table' => 'cvterm', 07533 'columns' => array( 07534 'cvterm_id' => 'cvterm_id', 07535 ), 07536 ), 07537 'phenotype' => array( 07538 'table' => 'phenotype', 07539 'columns' => array( 07540 'phenotype_id' => 'phenotype_id', 07541 ), 07542 ), 07543 ), 07544 ); 07545 return $description; 07546 } 07560 function tripal_core_chado_schema_v1_11_phenstatement() { 07561 $description = array( 07562 'table' => 'phenstatement', 07563 'fields' => array( 07564 'phenstatement_id' => array( 07565 'type' => 'serial', 07566 'not NULL' => '1', 07567 ), 07568 'genotype_id' => array( 07569 'type' => 'int', 07570 'not NULL' => '1', 07571 ), 07572 'environment_id' => array( 07573 'type' => 'int', 07574 'not NULL' => '1', 07575 ), 07576 'phenotype_id' => array( 07577 'type' => 'int', 07578 'not NULL' => '1', 07579 ), 07580 'type_id' => array( 07581 'type' => 'int', 07582 'not NULL' => '1', 07583 ), 07584 'pub_id' => array( 07585 'type' => 'int', 07586 'not NULL' => '1', 07587 ), 07588 ), 07589 'primary key' => array( 07590 0 => 'phenstatement_id', 07591 ), 07592 'unique keys' => array( 07593 'phenstatement_c1' => array( 07594 0 => 'genotype_id', 07595 1 => 'phenotype_id', 07596 2 => 'environment_id', 07597 3 => 'type_id', 07598 4 => 'pub_id', 07599 ), 07600 ), 07601 'indexes' => array( 07602 'phenstatement_idx1' => array( 07603 0 => 'genotype_id', 07604 ), 07605 'phenstatement_idx2' => array( 07606 0 => 'phenotype_id', 07607 ), 07608 ), 07609 'foreign keys' => array( 07610 'cvterm' => array( 07611 'table' => 'cvterm', 07612 'columns' => array( 07613 'type_id' => 'cvterm_id', 07614 ), 07615 ), 07616 'pub' => array( 07617 'table' => 'pub', 07618 'columns' => array( 07619 'pub_id' => 'pub_id', 07620 ), 07621 ), 07622 'phenotype' => array( 07623 'table' => 'phenotype', 07624 'columns' => array( 07625 'phenotype_id' => 'phenotype_id', 07626 ), 07627 ), 07628 'genotype' => array( 07629 'table' => 'genotype', 07630 'columns' => array( 07631 'genotype_id' => 'genotype_id', 07632 ), 07633 ), 07634 'environment' => array( 07635 'table' => 'environment', 07636 'columns' => array( 07637 'environment_id' => 'environment_id', 07638 ), 07639 ), 07640 ), 07641 ); 07642 return $description; 07643 } 07657 function tripal_core_chado_schema_v1_11_phylonode() { 07658 $description = array( 07659 'table' => 'phylonode', 07660 'fields' => array( 07661 'phylonode_id' => array( 07662 'type' => 'serial', 07663 'not NULL' => '1', 07664 ), 07665 'phylotree_id' => array( 07666 'type' => 'int', 07667 'not NULL' => '1', 07668 ), 07669 'parent_phylonode_id' => array( 07670 'type' => 'int', 07671 'not NULL' => '', 07672 ), 07673 'left_idx' => array( 07674 'type' => 'int', 07675 'not NULL' => '1', 07676 ), 07677 'right_idx' => array( 07678 'type' => 'int', 07679 'not NULL' => '1', 07680 ), 07681 'type_id' => array( 07682 'type' => 'int', 07683 'not NULL' => '', 07684 ), 07685 'feature_id' => array( 07686 'type' => 'int', 07687 'not NULL' => '', 07688 ), 07689 'label' => array( 07690 'type' => 'varchar', 07691 'length' => '255', 07692 'not NULL' => '', 07693 ), 07694 'distance' => array( 07695 'type' => 'float', 07696 'size' => 'big', 07697 'not NULL' => '', 07698 ), 07699 ), 07700 'primary key' => array( 07701 0 => 'phylonode_id', 07702 ), 07703 'unique keys' => array( 07704 'phylotree_id' => array( 07705 0 => 'phylotree_id', 07706 1 => 'left_idx', 07707 ), 07708 'phylonode_phylotree_id_key1' => array( 07709 0 => 'phylotree_id', 07710 1 => 'right_idx', 07711 ), 07712 ), 07713 'indexes' => array( 07714 ), 07715 'foreign keys' => array( 07716 'cvterm' => array( 07717 'table' => 'cvterm', 07718 'columns' => array( 07719 'type_id' => 'cvterm_id', 07720 ), 07721 ), 07722 'feature' => array( 07723 'table' => 'feature', 07724 'columns' => array( 07725 'feature_id' => 'feature_id', 07726 ), 07727 ), 07728 'phylotree' => array( 07729 'table' => 'phylotree', 07730 'columns' => array( 07731 'phylotree_id' => 'phylotree_id', 07732 ), 07733 ), 07734 'phylonode' => array( 07735 'table' => 'phylonode', 07736 'columns' => array( 07737 'parent_phylonode_id' => 'phylonode_id', 07738 ), 07739 ), 07740 ), 07741 ); 07742 return $description; 07743 } 07757 function tripal_core_chado_schema_v1_11_phylonode_dbxref() { 07758 $description = array( 07759 'table' => 'phylonode_dbxref', 07760 'fields' => array( 07761 'phylonode_dbxref_id' => array( 07762 'type' => 'serial', 07763 'not NULL' => '1', 07764 ), 07765 'phylonode_id' => array( 07766 'type' => 'int', 07767 'not NULL' => '1', 07768 ), 07769 'dbxref_id' => array( 07770 'type' => 'int', 07771 'not NULL' => '1', 07772 ), 07773 ), 07774 'primary key' => array( 07775 0 => 'phylonode_dbxref_id', 07776 ), 07777 'unique keys' => array( 07778 'phylonode_id' => array( 07779 0 => 'phylonode_id', 07780 1 => 'dbxref_id', 07781 ), 07782 ), 07783 'indexes' => array( 07784 'phylonode_dbxref_idx1' => array( 07785 0 => 'phylonode_id', 07786 ), 07787 'phylonode_dbxref_idx2' => array( 07788 0 => 'dbxref_id', 07789 ), 07790 ), 07791 'foreign keys' => array( 07792 'dbxref' => array( 07793 'table' => 'dbxref', 07794 'columns' => array( 07795 'dbxref_id' => 'dbxref_id', 07796 ), 07797 ), 07798 'phylonode' => array( 07799 'table' => 'phylonode', 07800 'columns' => array( 07801 'phylonode_id' => 'phylonode_id', 07802 ), 07803 ), 07804 ), 07805 ); 07806 return $description; 07807 } 07821 function tripal_core_chado_schema_v1_11_phylonode_organism() { 07822 $description = array( 07823 'table' => 'phylonode_organism', 07824 'fields' => array( 07825 'phylonode_organism_id' => array( 07826 'type' => 'serial', 07827 'not NULL' => '1', 07828 ), 07829 'phylonode_id' => array( 07830 'type' => 'int', 07831 'not NULL' => '1', 07832 ), 07833 'organism_id' => array( 07834 'type' => 'int', 07835 'not NULL' => '1', 07836 ), 07837 ), 07838 'primary key' => array( 07839 0 => 'phylonode_organism_id', 07840 ), 07841 'unique keys' => array( 07842 'phylonode_id' => array( 07843 0 => 'phylonode_id', 07844 ), 07845 ), 07846 'indexes' => array( 07847 'phylonode_organism_idx1' => array( 07848 0 => 'phylonode_id', 07849 ), 07850 'phylonode_organism_idx2' => array( 07851 0 => 'organism_id', 07852 ), 07853 ), 07854 'foreign keys' => array( 07855 'organism' => array( 07856 'table' => 'organism', 07857 'columns' => array( 07858 'organism_id' => 'organism_id', 07859 ), 07860 ), 07861 'phylonode' => array( 07862 'table' => 'phylonode', 07863 'columns' => array( 07864 'phylonode_id' => 'phylonode_id', 07865 ), 07866 ), 07867 ), 07868 ); 07869 return $description; 07870 } 07884 function tripal_core_chado_schema_v1_11_phylonode_pub() { 07885 $description = array( 07886 'table' => 'phylonode_pub', 07887 'fields' => array( 07888 'phylonode_pub_id' => array( 07889 'type' => 'serial', 07890 'not NULL' => '1', 07891 ), 07892 'phylonode_id' => array( 07893 'type' => 'int', 07894 'not NULL' => '1', 07895 ), 07896 'pub_id' => array( 07897 'type' => 'int', 07898 'not NULL' => '1', 07899 ), 07900 ), 07901 'primary key' => array( 07902 0 => 'phylonode_pub_id', 07903 ), 07904 'unique keys' => array( 07905 'phylonode_id' => array( 07906 0 => 'phylonode_id', 07907 1 => 'pub_id', 07908 ), 07909 ), 07910 'indexes' => array( 07911 'phylonode_pub_idx1' => array( 07912 0 => 'phylonode_id', 07913 ), 07914 'phylonode_pub_idx2' => array( 07915 0 => 'pub_id', 07916 ), 07917 ), 07918 'foreign keys' => array( 07919 'pub' => array( 07920 'table' => 'pub', 07921 'columns' => array( 07922 'pub_id' => 'pub_id', 07923 ), 07924 ), 07925 'phylonode' => array( 07926 'table' => 'phylonode', 07927 'columns' => array( 07928 'phylonode_id' => 'phylonode_id', 07929 ), 07930 ), 07931 ), 07932 ); 07933 return $description; 07934 } 07948 function tripal_core_chado_schema_v1_11_phylonode_relationship() { 07949 $description = array( 07950 'table' => 'phylonode_relationship', 07951 'fields' => array( 07952 'phylonode_relationship_id' => array( 07953 'type' => 'serial', 07954 'not NULL' => '1', 07955 ), 07956 'subject_id' => array( 07957 'type' => 'int', 07958 'not NULL' => '1', 07959 ), 07960 'object_id' => array( 07961 'type' => 'int', 07962 'not NULL' => '1', 07963 ), 07964 'type_id' => array( 07965 'type' => 'int', 07966 'not NULL' => '1', 07967 ), 07968 'rank' => array( 07969 'type' => 'int', 07970 'not NULL' => '', 07971 ), 07972 'phylotree_id' => array( 07973 'type' => 'int', 07974 'not NULL' => '1', 07975 ), 07976 ), 07977 'primary key' => array( 07978 0 => 'phylonode_relationship_id', 07979 ), 07980 'unique keys' => array( 07981 'subject_id' => array( 07982 0 => 'subject_id', 07983 1 => 'object_id', 07984 2 => 'type_id', 07985 ), 07986 ), 07987 'indexes' => array( 07988 'phylonode_relationship_idx1' => array( 07989 0 => 'subject_id', 07990 ), 07991 'phylonode_relationship_idx2' => array( 07992 0 => 'object_id', 07993 ), 07994 'phylonode_relationship_idx3' => array( 07995 0 => 'type_id', 07996 ), 07997 ), 07998 'foreign keys' => array( 07999 'cvterm' => array( 08000 'table' => 'cvterm', 08001 'columns' => array( 08002 'type_id' => 'cvterm_id', 08003 ), 08004 ), 08005 'phylotree' => array( 08006 'table' => 'phylotree', 08007 'columns' => array( 08008 'phylotree_id' => 'phylotree_id', 08009 ), 08010 ), 08011 'phylonode' => array( 08012 'table' => 'phylonode', 08013 'columns' => array( 08014 'subject_id' => 'phylonode_id', 08015 'object_id' => 'phylonode_id', 08016 ), 08017 ), 08018 ), 08019 ); 08020 return $description; 08021 } 08035 function tripal_core_chado_schema_v1_11_phylonodeprop() { 08036 $description = array( 08037 'table' => 'phylonodeprop', 08038 'fields' => array( 08039 'phylonodeprop_id' => array( 08040 'type' => 'serial', 08041 'not NULL' => '1', 08042 ), 08043 'phylonode_id' => array( 08044 'type' => 'int', 08045 'not NULL' => '1', 08046 ), 08047 'type_id' => array( 08048 'type' => 'int', 08049 'not NULL' => '1', 08050 ), 08051 'value' => array( 08052 'type' => 'text', 08053 'not NULL' => '1', 08054 'default' => '', 08055 ), 08056 'rank' => array( 08057 'type' => 'int', 08058 'not NULL' => '1', 08059 'default' => '0', 08060 ), 08061 ), 08062 'primary key' => array( 08063 0 => 'phylonodeprop_id', 08064 ), 08065 'unique keys' => array( 08066 'phylonode_id' => array( 08067 0 => 'phylonode_id', 08068 1 => 'type_id', 08069 2 => 'value', 08070 3 => 'rank', 08071 ), 08072 ), 08073 'indexes' => array( 08074 'phylonodeprop_idx1' => array( 08075 0 => 'phylonode_id', 08076 ), 08077 'phylonodeprop_idx2' => array( 08078 0 => 'type_id', 08079 ), 08080 ), 08081 'foreign keys' => array( 08082 'cvterm' => array( 08083 'table' => 'cvterm', 08084 'columns' => array( 08085 'type_id' => 'cvterm_id', 08086 ), 08087 ), 08088 'phylonode' => array( 08089 'table' => 'phylonode', 08090 'columns' => array( 08091 'phylonode_id' => 'phylonode_id', 08092 ), 08093 ), 08094 ), 08095 ); 08096 return $description; 08097 } 08111 function tripal_core_chado_schema_v1_11_phylotree() { 08112 $description = array( 08113 'table' => 'phylotree', 08114 'fields' => array( 08115 'phylotree_id' => array( 08116 'type' => 'serial', 08117 'not NULL' => '1', 08118 ), 08119 'dbxref_id' => array( 08120 'type' => 'int', 08121 'not NULL' => '1', 08122 ), 08123 'name' => array( 08124 'type' => 'varchar', 08125 'length' => '255', 08126 'not NULL' => '', 08127 ), 08128 'type_id' => array( 08129 'type' => 'int', 08130 'not NULL' => '', 08131 ), 08132 'analysis_id' => array( 08133 'type' => 'int', 08134 'not NULL' => '', 08135 ), 08136 'comment' => array( 08137 'type' => 'text', 08138 'not NULL' => '', 08139 ), 08140 ), 08141 'primary key' => array( 08142 0 => 'phylotree_id', 08143 ), 08144 'unique keys' => array( 08145 ), 08146 'indexes' => array( 08147 'phylotree_idx1' => array( 08148 0 => 'phylotree_id', 08149 ), 08150 ), 08151 'foreign keys' => array( 08152 'dbxref' => array( 08153 'table' => 'dbxref', 08154 'columns' => array( 08155 'dbxref_id' => 'dbxref_id', 08156 ), 08157 ), 08158 'cvterm' => array( 08159 'table' => 'cvterm', 08160 'columns' => array( 08161 'type_id' => 'cvterm_id', 08162 ), 08163 ), 08164 'analysis' => array( 08165 'table' => 'analysis', 08166 'columns' => array( 08167 'analysis_id' => 'analysis_id', 08168 ), 08169 ), 08170 ), 08171 ); 08172 return $description; 08173 } 08187 function tripal_core_chado_schema_v1_11_phylotree_pub() { 08188 $description = array( 08189 'table' => 'phylotree_pub', 08190 'fields' => array( 08191 'phylotree_pub_id' => array( 08192 'type' => 'serial', 08193 'not NULL' => '1', 08194 ), 08195 'phylotree_id' => array( 08196 'type' => 'int', 08197 'not NULL' => '1', 08198 ), 08199 'pub_id' => array( 08200 'type' => 'int', 08201 'not NULL' => '1', 08202 ), 08203 ), 08204 'primary key' => array( 08205 0 => 'phylotree_pub_id', 08206 ), 08207 'unique keys' => array( 08208 'phylotree_id' => array( 08209 0 => 'phylotree_id', 08210 1 => 'pub_id', 08211 ), 08212 ), 08213 'indexes' => array( 08214 'phylotree_pub_idx1' => array( 08215 0 => 'phylotree_id', 08216 ), 08217 'phylotree_pub_idx2' => array( 08218 0 => 'pub_id', 08219 ), 08220 ), 08221 'foreign keys' => array( 08222 'pub' => array( 08223 'table' => 'pub', 08224 'columns' => array( 08225 'pub_id' => 'pub_id', 08226 ), 08227 ), 08228 'phylotree' => array( 08229 'table' => 'phylotree', 08230 'columns' => array( 08231 'phylotree_id' => 'phylotree_id', 08232 ), 08233 ), 08234 ), 08235 ); 08236 return $description; 08237 } 08251 function tripal_core_chado_schema_v1_11_project() { 08252 $description = array( 08253 'table' => 'project', 08254 'fields' => array( 08255 'project_id' => array( 08256 'type' => 'serial', 08257 'not NULL' => '1', 08258 ), 08259 'name' => array( 08260 'type' => 'varchar', 08261 'length' => '255', 08262 'not NULL' => '1', 08263 ), 08264 'description' => array( 08265 'type' => 'varchar', 08266 'length' => '255', 08267 'not NULL' => '1', 08268 ), 08269 ), 08270 'primary key' => array( 08271 0 => 'project_id', 08272 ), 08273 'unique keys' => array( 08274 'project_c1' => array( 08275 0 => 'name', 08276 ), 08277 ), 08278 'indexes' => array( 08279 ), 08280 'foreign keys' => array( 08281 ), 08282 ); 08283 return $description; 08284 } 08298 function tripal_core_chado_schema_v1_11_protocol() { 08299 $description = array( 08300 'table' => 'protocol', 08301 'fields' => array( 08302 'protocol_id' => array( 08303 'type' => 'serial', 08304 'not NULL' => '1', 08305 ), 08306 'type_id' => array( 08307 'type' => 'int', 08308 'not NULL' => '1', 08309 ), 08310 'pub_id' => array( 08311 'type' => 'int', 08312 'not NULL' => '', 08313 ), 08314 'dbxref_id' => array( 08315 'type' => 'int', 08316 'not NULL' => '', 08317 ), 08318 'name' => array( 08319 'type' => 'text', 08320 'not NULL' => '1', 08321 ), 08322 'uri' => array( 08323 'type' => 'text', 08324 'not NULL' => '', 08325 ), 08326 'protocoldescription' => array( 08327 'type' => 'text', 08328 'not NULL' => '', 08329 ), 08330 'hardwaredescription' => array( 08331 'type' => 'text', 08332 'not NULL' => '', 08333 ), 08334 'softwaredescription' => array( 08335 'type' => 'text', 08336 'not NULL' => '', 08337 ), 08338 ), 08339 'primary key' => array( 08340 0 => 'protocol_id', 08341 ), 08342 'unique keys' => array( 08343 'protocol_c1' => array( 08344 0 => 'name', 08345 ), 08346 ), 08347 'indexes' => array( 08348 'protocol_idx1' => array( 08349 0 => 'type_id', 08350 ), 08351 'protocol_idx2' => array( 08352 0 => 'pub_id', 08353 ), 08354 'protocol_idx3' => array( 08355 0 => 'dbxref_id', 08356 ), 08357 ), 08358 'foreign keys' => array( 08359 'dbxref' => array( 08360 'table' => 'dbxref', 08361 'columns' => array( 08362 'dbxref_id' => 'dbxref_id', 08363 ), 08364 ), 08365 'cvterm' => array( 08366 'table' => 'cvterm', 08367 'columns' => array( 08368 'type_id' => 'cvterm_id', 08369 ), 08370 ), 08371 'pub' => array( 08372 'table' => 'pub', 08373 'columns' => array( 08374 'pub_id' => 'pub_id', 08375 ), 08376 ), 08377 ), 08378 ); 08379 return $description; 08380 } 08394 function tripal_core_chado_schema_v1_11_protocolparam() { 08395 $description = array( 08396 'table' => 'protocolparam', 08397 'fields' => array( 08398 'protocolparam_id' => array( 08399 'type' => 'serial', 08400 'not NULL' => '1', 08401 ), 08402 'protocol_id' => array( 08403 'type' => 'int', 08404 'not NULL' => '1', 08405 ), 08406 'name' => array( 08407 'type' => 'text', 08408 'not NULL' => '1', 08409 ), 08410 'datatype_id' => array( 08411 'type' => 'int', 08412 'not NULL' => '', 08413 ), 08414 'unittype_id' => array( 08415 'type' => 'int', 08416 'not NULL' => '', 08417 ), 08418 'value' => array( 08419 'type' => 'text', 08420 'not NULL' => '', 08421 ), 08422 'rank' => array( 08423 'type' => 'int', 08424 'not NULL' => '1', 08425 'default' => '0', 08426 ), 08427 ), 08428 'primary key' => array( 08429 0 => 'protocolparam_id', 08430 ), 08431 'unique keys' => array( 08432 ), 08433 'indexes' => array( 08434 'protocolparam_idx1' => array( 08435 0 => 'protocol_id', 08436 ), 08437 'protocolparam_idx2' => array( 08438 0 => 'datatype_id', 08439 ), 08440 'protocolparam_idx3' => array( 08441 0 => 'unittype_id', 08442 ), 08443 ), 08444 'foreign keys' => array( 08445 'cvterm' => array( 08446 'table' => 'cvterm', 08447 'columns' => array( 08448 'datatype_id' => 'cvterm_id', 08449 'unittype_id' => 'cvterm_id', 08450 ), 08451 ), 08452 'protocol' => array( 08453 'table' => 'protocol', 08454 'columns' => array( 08455 'protocol_id' => 'protocol_id', 08456 ), 08457 ), 08458 ), 08459 ); 08460 return $description; 08461 } 08475 function tripal_core_chado_schema_v1_11_pub() { 08476 $description = array( 08477 'table' => 'pub', 08478 'fields' => array( 08479 'pub_id' => array( 08480 'type' => 'serial', 08481 'not NULL' => '1', 08482 ), 08483 'title' => array( 08484 'type' => 'text', 08485 'not NULL' => '', 08486 ), 08487 'volumetitle' => array( 08488 'type' => 'text', 08489 'not NULL' => '', 08490 ), 08491 'volume' => array( 08492 'type' => 'varchar', 08493 'length' => '255', 08494 'not NULL' => '', 08495 ), 08496 'series_name' => array( 08497 'type' => 'varchar', 08498 'length' => '255', 08499 'not NULL' => '', 08500 ), 08501 'issue' => array( 08502 'type' => 'varchar', 08503 'length' => '255', 08504 'not NULL' => '', 08505 ), 08506 'pyear' => array( 08507 'type' => 'varchar', 08508 'length' => '255', 08509 'not NULL' => '', 08510 ), 08511 'pages' => array( 08512 'type' => 'varchar', 08513 'length' => '255', 08514 'not NULL' => '', 08515 ), 08516 'miniref' => array( 08517 'type' => 'varchar', 08518 'length' => '255', 08519 'not NULL' => '', 08520 ), 08521 'uniquename' => array( 08522 'type' => 'text', 08523 'not NULL' => '1', 08524 ), 08525 'type_id' => array( 08526 'type' => 'int', 08527 'not NULL' => '1', 08528 ), 08529 'is_obsolete' => array( 08530 'type' => 'boolean', 08531 'not NULL' => '', 08532 'default' => 'als', 08533 ), 08534 'publisher' => array( 08535 'type' => 'varchar', 08536 'length' => '255', 08537 'not NULL' => '', 08538 ), 08539 'pubplace' => array( 08540 'type' => 'varchar', 08541 'length' => '255', 08542 'not NULL' => '', 08543 ), 08544 ), 08545 'primary key' => array( 08546 0 => 'pub_id', 08547 ), 08548 'unique keys' => array( 08549 'pub_c1' => array( 08550 0 => 'uniquename', 08551 ), 08552 ), 08553 'indexes' => array( 08554 'pub_idx1' => array( 08555 0 => 'type_id', 08556 ), 08557 ), 08558 'foreign keys' => array( 08559 'cvterm' => array( 08560 'table' => 'cvterm', 08561 'columns' => array( 08562 'type_id' => 'cvterm_id', 08563 ), 08564 ), 08565 ), 08566 ); 08567 return $description; 08568 } 08582 function tripal_core_chado_schema_v1_11_pub_dbxref() { 08583 $description = array( 08584 'table' => 'pub_dbxref', 08585 'fields' => array( 08586 'pub_dbxref_id' => array( 08587 'type' => 'serial', 08588 'not NULL' => '1', 08589 ), 08590 'pub_id' => array( 08591 'type' => 'int', 08592 'not NULL' => '1', 08593 ), 08594 'dbxref_id' => array( 08595 'type' => 'int', 08596 'not NULL' => '1', 08597 ), 08598 'is_current' => array( 08599 'type' => 'boolean', 08600 'not NULL' => '1', 08601 'default' => 'ru', 08602 ), 08603 ), 08604 'primary key' => array( 08605 0 => 'pub_dbxref_id', 08606 ), 08607 'unique keys' => array( 08608 'pub_dbxref_c1' => array( 08609 0 => 'pub_id', 08610 1 => 'dbxref_id', 08611 ), 08612 ), 08613 'indexes' => array( 08614 'pub_dbxref_idx1' => array( 08615 0 => 'pub_id', 08616 ), 08617 'pub_dbxref_idx2' => array( 08618 0 => 'dbxref_id', 08619 ), 08620 ), 08621 'foreign keys' => array( 08622 'dbxref' => array( 08623 'table' => 'dbxref', 08624 'columns' => array( 08625 'dbxref_id' => 'dbxref_id', 08626 ), 08627 ), 08628 'pub' => array( 08629 'table' => 'pub', 08630 'columns' => array( 08631 'pub_id' => 'pub_id', 08632 ), 08633 ), 08634 ), 08635 ); 08636 return $description; 08637 } 08651 function tripal_core_chado_schema_v1_11_pub_relationship() { 08652 $description = array( 08653 'table' => 'pub_relationship', 08654 'fields' => array( 08655 'pub_relationship_id' => array( 08656 'type' => 'serial', 08657 'not NULL' => '1', 08658 ), 08659 'subject_id' => array( 08660 'type' => 'int', 08661 'not NULL' => '1', 08662 ), 08663 'object_id' => array( 08664 'type' => 'int', 08665 'not NULL' => '1', 08666 ), 08667 'type_id' => array( 08668 'type' => 'int', 08669 'not NULL' => '1', 08670 ), 08671 ), 08672 'primary key' => array( 08673 0 => 'pub_relationship_id', 08674 ), 08675 'unique keys' => array( 08676 'pub_relationship_c1' => array( 08677 0 => 'subject_id', 08678 1 => 'object_id', 08679 2 => 'type_id', 08680 ), 08681 ), 08682 'indexes' => array( 08683 'pub_relationship_idx1' => array( 08684 0 => 'subject_id', 08685 ), 08686 'pub_relationship_idx2' => array( 08687 0 => 'object_id', 08688 ), 08689 'pub_relationship_idx3' => array( 08690 0 => 'type_id', 08691 ), 08692 ), 08693 'foreign keys' => array( 08694 'cvterm' => array( 08695 'table' => 'cvterm', 08696 'columns' => array( 08697 'type_id' => 'cvterm_id', 08698 ), 08699 ), 08700 'pub' => array( 08701 'table' => 'pub', 08702 'columns' => array( 08703 'subject_id' => 'pub_id', 08704 'object_id' => 'pub_id', 08705 ), 08706 ), 08707 ), 08708 ); 08709 return $description; 08710 } 08724 function tripal_core_chado_schema_v1_11_pubauthor() { 08725 $description = array( 08726 'table' => 'pubauthor', 08727 'fields' => array( 08728 'pubauthor_id' => array( 08729 'type' => 'serial', 08730 'not NULL' => '1', 08731 ), 08732 'pub_id' => array( 08733 'type' => 'int', 08734 'not NULL' => '1', 08735 ), 08736 'rank' => array( 08737 'type' => 'int', 08738 'not NULL' => '1', 08739 ), 08740 'editor' => array( 08741 'type' => 'boolean', 08742 'not NULL' => '', 08743 'default' => 'als', 08744 ), 08745 'surname' => array( 08746 'type' => 'varchar', 08747 'length' => '100', 08748 'not NULL' => '1', 08749 ), 08750 'givennames' => array( 08751 'type' => 'varchar', 08752 'length' => '100', 08753 'not NULL' => '', 08754 ), 08755 'suffix' => array( 08756 'type' => 'varchar', 08757 'length' => '100', 08758 'not NULL' => '', 08759 ), 08760 ), 08761 'primary key' => array( 08762 0 => 'pubauthor_id', 08763 ), 08764 'unique keys' => array( 08765 'pubauthor_c1' => array( 08766 0 => 'pub_id', 08767 1 => 'rank', 08768 ), 08769 ), 08770 'indexes' => array( 08771 'pubauthor_idx2' => array( 08772 0 => 'pub_id', 08773 ), 08774 ), 08775 'foreign keys' => array( 08776 'pub' => array( 08777 'table' => 'pub', 08778 'columns' => array( 08779 'pub_id' => 'pub_id', 08780 ), 08781 ), 08782 ), 08783 ); 08784 return $description; 08785 } 08799 function tripal_core_chado_schema_v1_11_pubprop() { 08800 $description = array( 08801 'table' => 'pubprop', 08802 'fields' => array( 08803 'pubprop_id' => array( 08804 'type' => 'serial', 08805 'not NULL' => '1', 08806 ), 08807 'pub_id' => array( 08808 'type' => 'int', 08809 'not NULL' => '1', 08810 ), 08811 'type_id' => array( 08812 'type' => 'int', 08813 'not NULL' => '1', 08814 ), 08815 'value' => array( 08816 'type' => 'text', 08817 'not NULL' => '1', 08818 ), 08819 'rank' => array( 08820 'type' => 'int', 08821 'not NULL' => '', 08822 ), 08823 ), 08824 'primary key' => array( 08825 0 => 'pubprop_id', 08826 ), 08827 'unique keys' => array( 08828 'pubprop_c1' => array( 08829 0 => 'pub_id', 08830 1 => 'type_id', 08831 2 => 'rank', 08832 ), 08833 ), 08834 'indexes' => array( 08835 'pubprop_idx1' => array( 08836 0 => 'pub_id', 08837 ), 08838 'pubprop_idx2' => array( 08839 0 => 'type_id', 08840 ), 08841 ), 08842 'foreign keys' => array( 08843 'cvterm' => array( 08844 'table' => 'cvterm', 08845 'columns' => array( 08846 'type_id' => 'cvterm_id', 08847 ), 08848 ), 08849 'pub' => array( 08850 'table' => 'pub', 08851 'columns' => array( 08852 'pub_id' => 'pub_id', 08853 ), 08854 ), 08855 ), 08856 ); 08857 return $description; 08858 } 08872 function tripal_core_chado_schema_v1_11_quantification() { 08873 $description = array( 08874 'table' => 'quantification', 08875 'fields' => array( 08876 'quantification_id' => array( 08877 'type' => 'serial', 08878 'not NULL' => '1', 08879 ), 08880 'acquisition_id' => array( 08881 'type' => 'int', 08882 'not NULL' => '1', 08883 ), 08884 'operator_id' => array( 08885 'type' => 'int', 08886 'not NULL' => '', 08887 ), 08888 'protocol_id' => array( 08889 'type' => 'int', 08890 'not NULL' => '', 08891 ), 08892 'analysis_id' => array( 08893 'type' => 'int', 08894 'not NULL' => '1', 08895 ), 08896 'quantificationdate' => array( 08897 'type' => 'datetime', 08898 'not NULL' => '', 08899 'default' => 'ow(', 08900 ), 08901 'name' => array( 08902 'type' => 'text', 08903 'not NULL' => '', 08904 ), 08905 'uri' => array( 08906 'type' => 'text', 08907 'not NULL' => '', 08908 ), 08909 ), 08910 'primary key' => array( 08911 0 => 'quantification_id', 08912 ), 08913 'unique keys' => array( 08914 'quantification_c1' => array( 08915 0 => 'name', 08916 1 => 'analysis_id', 08917 ), 08918 ), 08919 'indexes' => array( 08920 'quantification_idx1' => array( 08921 0 => 'acquisition_id', 08922 ), 08923 'quantification_idx2' => array( 08924 0 => 'operator_id', 08925 ), 08926 'quantification_idx3' => array( 08927 0 => 'protocol_id', 08928 ), 08929 'quantification_idx4' => array( 08930 0 => 'analysis_id', 08931 ), 08932 ), 08933 'foreign keys' => array( 08934 'analysis' => array( 08935 'table' => 'analysis', 08936 'columns' => array( 08937 'analysis_id' => 'analysis_id', 08938 ), 08939 ), 08940 'contact' => array( 08941 'table' => 'contact', 08942 'columns' => array( 08943 'operator_id' => 'contact_id', 08944 ), 08945 ), 08946 'protocol' => array( 08947 'table' => 'protocol', 08948 'columns' => array( 08949 'protocol_id' => 'protocol_id', 08950 ), 08951 ), 08952 'acquisition' => array( 08953 'table' => 'acquisition', 08954 'columns' => array( 08955 'acquisition_id' => 'acquisition_id', 08956 ), 08957 ), 08958 ), 08959 ); 08960 return $description; 08961 } 08975 function tripal_core_chado_schema_v1_11_quantification_relationship() { 08976 $description = array( 08977 'table' => 'quantification_relationship', 08978 'fields' => array( 08979 'quantification_relationship_id' => array( 08980 'type' => 'serial', 08981 'not NULL' => '1', 08982 ), 08983 'subject_id' => array( 08984 'type' => 'int', 08985 'not NULL' => '1', 08986 ), 08987 'type_id' => array( 08988 'type' => 'int', 08989 'not NULL' => '1', 08990 ), 08991 'object_id' => array( 08992 'type' => 'int', 08993 'not NULL' => '1', 08994 ), 08995 ), 08996 'primary key' => array( 08997 0 => 'quantification_relationship_id', 08998 ), 08999 'unique keys' => array( 09000 'quantification_relationship_c1' => array( 09001 0 => 'subject_id', 09002 1 => 'object_id', 09003 2 => 'type_id', 09004 ), 09005 ), 09006 'indexes' => array( 09007 'quantification_relationship_idx1' => array( 09008 0 => 'subject_id', 09009 ), 09010 'quantification_relationship_idx2' => array( 09011 0 => 'type_id', 09012 ), 09013 'quantification_relationship_idx3' => array( 09014 0 => 'object_id', 09015 ), 09016 ), 09017 'foreign keys' => array( 09018 'cvterm' => array( 09019 'table' => 'cvterm', 09020 'columns' => array( 09021 'type_id' => 'cvterm_id', 09022 ), 09023 ), 09024 'quantification' => array( 09025 'table' => 'quantification', 09026 'columns' => array( 09027 'subject_id' => 'quantification_id', 09028 'object_id' => 'quantification_id', 09029 ), 09030 ), 09031 ), 09032 ); 09033 return $description; 09034 } 09048 function tripal_core_chado_schema_v1_11_quantificationprop() { 09049 $description = array( 09050 'table' => 'quantificationprop', 09051 'fields' => array( 09052 'quantificationprop_id' => array( 09053 'type' => 'serial', 09054 'not NULL' => '1', 09055 ), 09056 'quantification_id' => array( 09057 'type' => 'int', 09058 'not NULL' => '1', 09059 ), 09060 'type_id' => array( 09061 'type' => 'int', 09062 'not NULL' => '1', 09063 ), 09064 'value' => array( 09065 'type' => 'text', 09066 'not NULL' => '', 09067 ), 09068 'rank' => array( 09069 'type' => 'int', 09070 'not NULL' => '1', 09071 'default' => '0', 09072 ), 09073 ), 09074 'primary key' => array( 09075 0 => 'quantificationprop_id', 09076 ), 09077 'unique keys' => array( 09078 'quantificationprop_c1' => array( 09079 0 => 'quantification_id', 09080 1 => 'type_id', 09081 2 => 'rank', 09082 ), 09083 ), 09084 'indexes' => array( 09085 'quantificationprop_idx1' => array( 09086 0 => 'quantification_id', 09087 ), 09088 'quantificationprop_idx2' => array( 09089 0 => 'type_id', 09090 ), 09091 ), 09092 'foreign keys' => array( 09093 'cvterm' => array( 09094 'table' => 'cvterm', 09095 'columns' => array( 09096 'type_id' => 'cvterm_id', 09097 ), 09098 ), 09099 'quantification' => array( 09100 'table' => 'quantification', 09101 'columns' => array( 09102 'quantification_id' => 'quantification_id', 09103 ), 09104 ), 09105 ), 09106 ); 09107 return $description; 09108 } 09122 function tripal_core_chado_schema_v1_11_stock() { 09123 $description = array( 09124 'table' => 'stock', 09125 'referring_tables' => array( 09126 1 => 'stock_cvterm', 09127 2 => 'stock_dbxref', 09128 3 => 'stock_genotype', 09129 4 => 'stock_pub', 09130 5 => 'stock_relationship', 09131 7 => 'stockcollection_stock', 09132 8 => 'stockprop', 09133 ), 09134 'fields' => array( 09135 'stock_id' => array( 09136 'type' => 'serial', 09137 'not NULL' => '1', 09138 ), 09139 'dbxref_id' => array( 09140 'type' => 'int', 09141 'not NULL' => '', 09142 ), 09143 'organism_id' => array( 09144 'type' => 'int', 09145 'not NULL' => '1', 09146 ), 09147 'name' => array( 09148 'type' => 'varchar', 09149 'length' => '255', 09150 'not NULL' => '', 09151 ), 09152 'uniquename' => array( 09153 'type' => 'text', 09154 'not NULL' => '1', 09155 ), 09156 'description' => array( 09157 'type' => 'text', 09158 'not NULL' => '', 09159 ), 09160 'type_id' => array( 09161 'type' => 'int', 09162 'not NULL' => '1', 09163 ), 09164 'is_obsolete' => array( 09165 'type' => 'boolean', 09166 'not NULL' => '1', 09167 'default' => 'als', 09168 ), 09169 ), 09170 'primary key' => array( 09171 0 => 'stock_id', 09172 ), 09173 'unique keys' => array( 09174 'stock_c1' => array( 09175 0 => 'organism_id', 09176 1 => 'uniquename', 09177 2 => 'type_id', 09178 ), 09179 ), 09180 'indexes' => array( 09181 'stock_idx1' => array( 09182 0 => 'dbxref_id', 09183 ), 09184 'stock_idx2' => array( 09185 0 => 'organism_id', 09186 ), 09187 'stock_idx3' => array( 09188 0 => 'type_id', 09189 ), 09190 'stock_idx4' => array( 09191 0 => 'uniquename', 09192 ), 09193 'stock_name_ind1' => array( 09194 0 => 'name', 09195 ), 09196 ), 09197 'foreign keys' => array( 09198 'dbxref' => array( 09199 'table' => 'dbxref', 09200 'columns' => array( 09201 'dbxref_id' => 'dbxref_id', 09202 ), 09203 ), 09204 'cvterm' => array( 09205 'table' => 'cvterm', 09206 'columns' => array( 09207 'type_id' => 'cvterm_id', 09208 ), 09209 ), 09210 'organism' => array( 09211 'table' => 'organism', 09212 'columns' => array( 09213 'organism_id' => 'organism_id', 09214 ), 09215 ), 09216 ), 09217 ); 09218 return $description; 09219 } 09233 function tripal_core_chado_schema_v1_11_stock_cvterm() { 09234 $description = array( 09235 'table' => 'stock_cvterm', 09236 'fields' => array( 09237 'stock_cvterm_id' => array( 09238 'type' => 'serial', 09239 'not NULL' => '1', 09240 ), 09241 'stock_id' => array( 09242 'type' => 'int', 09243 'not NULL' => '1', 09244 ), 09245 'cvterm_id' => array( 09246 'type' => 'int', 09247 'not NULL' => '1', 09248 ), 09249 'pub_id' => array( 09250 'type' => 'int', 09251 'not NULL' => '1', 09252 ), 09253 ), 09254 'primary key' => array( 09255 0 => 'stock_cvterm_id', 09256 ), 09257 'unique keys' => array( 09258 'stock_cvterm_c1' => array( 09259 0 => 'stock_id', 09260 1 => 'cvterm_id', 09261 2 => 'pub_id', 09262 ), 09263 ), 09264 'indexes' => array( 09265 'stock_cvterm_idx1' => array( 09266 0 => 'stock_id', 09267 ), 09268 'stock_cvterm_idx2' => array( 09269 0 => 'cvterm_id', 09270 ), 09271 'stock_cvterm_idx3' => array( 09272 0 => 'pub_id', 09273 ), 09274 ), 09275 'foreign keys' => array( 09276 'cvterm' => array( 09277 'table' => 'cvterm', 09278 'columns' => array( 09279 'cvterm_id' => 'cvterm_id', 09280 ), 09281 ), 09282 'pub' => array( 09283 'table' => 'pub', 09284 'columns' => array( 09285 'pub_id' => 'pub_id', 09286 ), 09287 ), 09288 'stock' => array( 09289 'table' => 'stock', 09290 'columns' => array( 09291 'stock_id' => 'stock_id', 09292 ), 09293 ), 09294 ), 09295 ); 09296 return $description; 09297 } 09311 function tripal_core_chado_schema_v1_11_stock_dbxref() { 09312 $description = array( 09313 'table' => 'stock_dbxref', 09314 'fields' => array( 09315 'stock_dbxref_id' => array( 09316 'type' => 'serial', 09317 'not NULL' => '1', 09318 ), 09319 'stock_id' => array( 09320 'type' => 'int', 09321 'not NULL' => '1', 09322 ), 09323 'dbxref_id' => array( 09324 'type' => 'int', 09325 'not NULL' => '1', 09326 ), 09327 'is_current' => array( 09328 'type' => 'boolean', 09329 'not NULL' => '1', 09330 'default' => 'ru', 09331 ), 09332 ), 09333 'primary key' => array( 09334 0 => 'stock_dbxref_id', 09335 ), 09336 'unique keys' => array( 09337 'stock_dbxref_c1' => array( 09338 0 => 'stock_id', 09339 1 => 'dbxref_id', 09340 ), 09341 ), 09342 'indexes' => array( 09343 'stock_dbxref_idx1' => array( 09344 0 => 'stock_id', 09345 ), 09346 'stock_dbxref_idx2' => array( 09347 0 => 'dbxref_id', 09348 ), 09349 ), 09350 'foreign keys' => array( 09351 'dbxref' => array( 09352 'table' => 'dbxref', 09353 'columns' => array( 09354 'dbxref_id' => 'dbxref_id', 09355 ), 09356 ), 09357 'stock' => array( 09358 'table' => 'stock', 09359 'columns' => array( 09360 'stock_id' => 'stock_id', 09361 ), 09362 ), 09363 ), 09364 ); 09365 return $description; 09366 } 09380 function tripal_core_chado_schema_v1_11_stock_genotype() { 09381 $description = array( 09382 'table' => 'stock_genotype', 09383 'fields' => array( 09384 'stock_genotype_id' => array( 09385 'type' => 'serial', 09386 'not NULL' => '1', 09387 ), 09388 'stock_id' => array( 09389 'type' => 'int', 09390 'not NULL' => '1', 09391 ), 09392 'genotype_id' => array( 09393 'type' => 'int', 09394 'not NULL' => '1', 09395 ), 09396 ), 09397 'primary key' => array( 09398 0 => 'stock_genotype_id', 09399 ), 09400 'unique keys' => array( 09401 'stock_genotype_c1' => array( 09402 0 => 'stock_id', 09403 1 => 'genotype_id', 09404 ), 09405 ), 09406 'indexes' => array( 09407 'stock_genotype_idx1' => array( 09408 0 => 'stock_id', 09409 ), 09410 'stock_genotype_idx2' => array( 09411 0 => 'genotype_id', 09412 ), 09413 ), 09414 'foreign keys' => array( 09415 'genotype' => array( 09416 'table' => 'genotype', 09417 'columns' => array( 09418 'genotype_id' => 'genotype_id', 09419 ), 09420 ), 09421 'stock' => array( 09422 'table' => 'stock', 09423 'columns' => array( 09424 'stock_id' => 'stock_id', 09425 ), 09426 ), 09427 ), 09428 ); 09429 return $description; 09430 } 09444 function tripal_core_chado_schema_v1_11_stock_pub() { 09445 $description = array( 09446 'table' => 'stock_pub', 09447 'fields' => array( 09448 'stock_pub_id' => array( 09449 'type' => 'serial', 09450 'not NULL' => '1', 09451 ), 09452 'stock_id' => array( 09453 'type' => 'int', 09454 'not NULL' => '1', 09455 ), 09456 'pub_id' => array( 09457 'type' => 'int', 09458 'not NULL' => '1', 09459 ), 09460 ), 09461 'primary key' => array( 09462 0 => 'stock_pub_id', 09463 ), 09464 'unique keys' => array( 09465 'stock_pub_c1' => array( 09466 0 => 'stock_id', 09467 1 => 'pub_id', 09468 ), 09469 ), 09470 'indexes' => array( 09471 'stock_pub_idx1' => array( 09472 0 => 'stock_id', 09473 ), 09474 'stock_pub_idx2' => array( 09475 0 => 'pub_id', 09476 ), 09477 ), 09478 'foreign keys' => array( 09479 'pub' => array( 09480 'table' => 'pub', 09481 'columns' => array( 09482 'pub_id' => 'pub_id', 09483 ), 09484 ), 09485 'stock' => array( 09486 'table' => 'stock', 09487 'columns' => array( 09488 'stock_id' => 'stock_id', 09489 ), 09490 ), 09491 ), 09492 ); 09493 return $description; 09494 } 09508 function tripal_core_chado_schema_v1_11_stock_relationship() { 09509 $description = array( 09510 'table' => 'stock_relationship', 09511 'fields' => array( 09512 'stock_relationship_id' => array( 09513 'type' => 'serial', 09514 'not NULL' => '1', 09515 ), 09516 'subject_id' => array( 09517 'type' => 'int', 09518 'not NULL' => '1', 09519 ), 09520 'object_id' => array( 09521 'type' => 'int', 09522 'not NULL' => '1', 09523 ), 09524 'type_id' => array( 09525 'type' => 'int', 09526 'not NULL' => '1', 09527 ), 09528 'value' => array( 09529 'type' => 'text', 09530 'not NULL' => '', 09531 ), 09532 'rank' => array( 09533 'type' => 'int', 09534 'not NULL' => '1', 09535 'default' => '0', 09536 ), 09537 ), 09538 'primary key' => array( 09539 0 => 'stock_relationship_id', 09540 ), 09541 'unique keys' => array( 09542 'stock_relationship_c1' => array( 09543 0 => 'subject_id', 09544 1 => 'object_id', 09545 2 => 'type_id', 09546 3 => 'rank', 09547 ), 09548 ), 09549 'indexes' => array( 09550 'stock_relationship_idx1' => array( 09551 0 => 'subject_id', 09552 ), 09553 'stock_relationship_idx2' => array( 09554 0 => 'object_id', 09555 ), 09556 'stock_relationship_idx3' => array( 09557 0 => 'type_id', 09558 ), 09559 ), 09560 'foreign keys' => array( 09561 'cvterm' => array( 09562 'table' => 'cvterm', 09563 'columns' => array( 09564 'type_id' => 'cvterm_id', 09565 ), 09566 ), 09567 'stock' => array( 09568 'table' => 'stock', 09569 'columns' => array( 09570 'subject_id' => 'stock_id', 09571 'object_id' => 'stock_id', 09572 ), 09573 ), 09574 ), 09575 ); 09576 return $description; 09577 } 09591 function tripal_core_chado_schema_v1_11_stock_relationship_pub() { 09592 $description = array( 09593 'table' => 'stock_relationship_pub', 09594 'fields' => array( 09595 'stock_relationship_pub_id' => array( 09596 'type' => 'serial', 09597 'not NULL' => '1', 09598 ), 09599 'stock_relationship_id' => array( 09600 'type' => 'int', 09601 'not NULL' => '1', 09602 ), 09603 'pub_id' => array( 09604 'type' => 'int', 09605 'not NULL' => '1', 09606 ), 09607 ), 09608 'primary key' => array( 09609 0 => 'stock_relationship_pub_id', 09610 ), 09611 'unique keys' => array( 09612 'stock_relationship_pub_c1' => array( 09613 0 => 'stock_relationship_id', 09614 1 => 'pub_id', 09615 ), 09616 ), 09617 'indexes' => array( 09618 'stock_relationship_pub_idx1' => array( 09619 0 => 'stock_relationship_id', 09620 ), 09621 'stock_relationship_pub_idx2' => array( 09622 0 => 'pub_id', 09623 ), 09624 ), 09625 'foreign keys' => array( 09626 'pub' => array( 09627 'table' => 'pub', 09628 'columns' => array( 09629 'pub_id' => 'pub_id', 09630 ), 09631 ), 09632 'stock_relationship' => array( 09633 'table' => 'stock_relationship', 09634 'columns' => array( 09635 'stock_relationship_id' => 'stock_relationship_id', 09636 ), 09637 ), 09638 ), 09639 ); 09640 return $description; 09641 } 09655 function tripal_core_chado_schema_v1_11_stockcollection() { 09656 $description = array( 09657 'table' => 'stockcollection', 09658 'fields' => array( 09659 'stockcollection_id' => array( 09660 'type' => 'serial', 09661 'not NULL' => '1', 09662 ), 09663 'type_id' => array( 09664 'type' => 'int', 09665 'not NULL' => '1', 09666 ), 09667 'contact_id' => array( 09668 'type' => 'int', 09669 'not NULL' => '', 09670 ), 09671 'name' => array( 09672 'type' => 'varchar', 09673 'length' => '255', 09674 'not NULL' => '', 09675 ), 09676 'uniquename' => array( 09677 'type' => 'text', 09678 'not NULL' => '1', 09679 ), 09680 ), 09681 'primary key' => array( 09682 0 => 'stockcollection_id', 09683 ), 09684 'unique keys' => array( 09685 'stockcollection_c1' => array( 09686 0 => 'uniquename', 09687 1 => 'type_id', 09688 ), 09689 ), 09690 'indexes' => array( 09691 'stockcollection_idx1' => array( 09692 0 => 'contact_id', 09693 ), 09694 'stockcollection_idx2' => array( 09695 0 => 'type_id', 09696 ), 09697 'stockcollection_idx3' => array( 09698 0 => 'uniquename', 09699 ), 09700 'stockcollection_name_ind1' => array( 09701 0 => 'name', 09702 ), 09703 ), 09704 'foreign keys' => array( 09705 'cvterm' => array( 09706 'table' => 'cvterm', 09707 'columns' => array( 09708 'type_id' => 'cvterm_id', 09709 ), 09710 ), 09711 'contact' => array( 09712 'table' => 'contact', 09713 'columns' => array( 09714 'contact_id' => 'contact_id', 09715 ), 09716 ), 09717 ), 09718 ); 09719 return $description; 09720 } 09734 function tripal_core_chado_schema_v1_11_stockcollection_stock() { 09735 $description = array( 09736 'table' => 'stockcollection_stock', 09737 'fields' => array( 09738 'stockcollection_stock_id' => array( 09739 'type' => 'serial', 09740 'not NULL' => '1', 09741 ), 09742 'stockcollection_id' => array( 09743 'type' => 'int', 09744 'not NULL' => '1', 09745 ), 09746 'stock_id' => array( 09747 'type' => 'int', 09748 'not NULL' => '1', 09749 ), 09750 ), 09751 'primary key' => array( 09752 0 => 'stockcollection_stock_id', 09753 ), 09754 'unique keys' => array( 09755 'stockcollection_stock_c1' => array( 09756 0 => 'stockcollection_id', 09757 1 => 'stock_id', 09758 ), 09759 ), 09760 'indexes' => array( 09761 'stockcollection_stock_idx1' => array( 09762 0 => 'stockcollection_id', 09763 ), 09764 'stockcollection_stock_idx2' => array( 09765 0 => 'stock_id', 09766 ), 09767 ), 09768 'foreign keys' => array( 09769 'stock' => array( 09770 'table' => 'stock', 09771 'columns' => array( 09772 'stock_id' => 'stock_id', 09773 ), 09774 ), 09775 'stockcollection' => array( 09776 'table' => 'stockcollection', 09777 'columns' => array( 09778 'stockcollection_id' => 'stockcollection_id', 09779 ), 09780 ), 09781 ), 09782 ); 09783 return $description; 09784 } 09798 function tripal_core_chado_schema_v1_11_stockcollectionprop() { 09799 $description = array( 09800 'table' => 'stockcollectionprop', 09801 'fields' => array( 09802 'stockcollectionprop_id' => array( 09803 'type' => 'serial', 09804 'not NULL' => '1', 09805 ), 09806 'stockcollection_id' => array( 09807 'type' => 'int', 09808 'not NULL' => '1', 09809 ), 09810 'type_id' => array( 09811 'type' => 'int', 09812 'not NULL' => '1', 09813 ), 09814 'value' => array( 09815 'type' => 'text', 09816 'not NULL' => '', 09817 ), 09818 'rank' => array( 09819 'type' => 'int', 09820 'not NULL' => '1', 09821 'default' => '0', 09822 ), 09823 ), 09824 'primary key' => array( 09825 0 => 'stockcollectionprop_id', 09826 ), 09827 'unique keys' => array( 09828 'stockcollectionprop_c1' => array( 09829 0 => 'stockcollection_id', 09830 1 => 'type_id', 09831 2 => 'rank', 09832 ), 09833 ), 09834 'indexes' => array( 09835 'stockcollectionprop_idx1' => array( 09836 0 => 'stockcollection_id', 09837 ), 09838 'stockcollectionprop_idx2' => array( 09839 0 => 'type_id', 09840 ), 09841 ), 09842 'foreign keys' => array( 09843 'cvterm' => array( 09844 'table' => 'cvterm', 09845 'columns' => array( 09846 'type_id' => 'cvterm_id', 09847 ), 09848 ), 09849 'stockcollection' => array( 09850 'table' => 'stockcollection', 09851 'columns' => array( 09852 'stockcollection_id' => 'stockcollection_id', 09853 ), 09854 ), 09855 ), 09856 ); 09857 return $description; 09858 } 09872 function tripal_core_chado_schema_v1_11_stockprop() { 09873 $description = array( 09874 'table' => 'stockprop', 09875 'fields' => array( 09876 'stockprop_id' => array( 09877 'type' => 'serial', 09878 'not NULL' => '1', 09879 ), 09880 'stock_id' => array( 09881 'type' => 'int', 09882 'not NULL' => '1', 09883 ), 09884 'type_id' => array( 09885 'type' => 'int', 09886 'not NULL' => '1', 09887 ), 09888 'value' => array( 09889 'type' => 'text', 09890 'not NULL' => '', 09891 ), 09892 'rank' => array( 09893 'type' => 'int', 09894 'not NULL' => '1', 09895 'default' => '0', 09896 ), 09897 ), 09898 'primary key' => array( 09899 0 => 'stockprop_id', 09900 ), 09901 'unique keys' => array( 09902 'stockprop_c1' => array( 09903 0 => 'stock_id', 09904 1 => 'type_id', 09905 2 => 'rank', 09906 ), 09907 ), 09908 'indexes' => array( 09909 'stockprop_idx1' => array( 09910 0 => 'stock_id', 09911 ), 09912 'stockprop_idx2' => array( 09913 0 => 'type_id', 09914 ), 09915 ), 09916 'foreign keys' => array( 09917 'cvterm' => array( 09918 'table' => 'cvterm', 09919 'columns' => array( 09920 'type_id' => 'cvterm_id', 09921 ), 09922 ), 09923 'stock' => array( 09924 'table' => 'stock', 09925 'columns' => array( 09926 'stock_id' => 'stock_id', 09927 ), 09928 ), 09929 ), 09930 ); 09931 return $description; 09932 } 09946 function tripal_core_chado_schema_v1_11_stockprop_pub() { 09947 $description = array( 09948 'table' => 'stockprop_pub', 09949 'fields' => array( 09950 'stockprop_pub_id' => array( 09951 'type' => 'serial', 09952 'not NULL' => '1', 09953 ), 09954 'stockprop_id' => array( 09955 'type' => 'int', 09956 'not NULL' => '1', 09957 ), 09958 'pub_id' => array( 09959 'type' => 'int', 09960 'not NULL' => '1', 09961 ), 09962 ), 09963 'primary key' => array( 09964 0 => 'stockprop_pub_id', 09965 ), 09966 'unique keys' => array( 09967 'stockprop_pub_c1' => array( 09968 0 => 'stockprop_id', 09969 1 => 'pub_id', 09970 ), 09971 ), 09972 'indexes' => array( 09973 'stockprop_pub_idx1' => array( 09974 0 => 'stockprop_id', 09975 ), 09976 'stockprop_pub_idx2' => array( 09977 0 => 'pub_id', 09978 ), 09979 ), 09980 'foreign keys' => array( 09981 'pub' => array( 09982 'table' => 'pub', 09983 'columns' => array( 09984 'pub_id' => 'pub_id', 09985 ), 09986 ), 09987 'stockprop' => array( 09988 'table' => 'stockprop', 09989 'columns' => array( 09990 'stockprop_id' => 'stockprop_id', 09991 ), 09992 ), 09993 ), 09994 ); 09995 return $description; 09996 } 10010 function tripal_core_chado_schema_v1_11_study() { 10011 $description = array( 10012 'table' => 'study', 10013 'fields' => array( 10014 'study_id' => array( 10015 'type' => 'serial', 10016 'not NULL' => '1', 10017 ), 10018 'contact_id' => array( 10019 'type' => 'int', 10020 'not NULL' => '1', 10021 ), 10022 'pub_id' => array( 10023 'type' => 'int', 10024 'not NULL' => '', 10025 ), 10026 'dbxref_id' => array( 10027 'type' => 'int', 10028 'not NULL' => '', 10029 ), 10030 'name' => array( 10031 'type' => 'text', 10032 'not NULL' => '1', 10033 ), 10034 'description' => array( 10035 'type' => 'text', 10036 'not NULL' => '', 10037 ), 10038 ), 10039 'primary key' => array( 10040 0 => 'study_id', 10041 ), 10042 'unique keys' => array( 10043 'study_c1' => array( 10044 0 => 'name', 10045 ), 10046 ), 10047 'indexes' => array( 10048 'study_idx1' => array( 10049 0 => 'contact_id', 10050 ), 10051 'study_idx2' => array( 10052 0 => 'pub_id', 10053 ), 10054 'study_idx3' => array( 10055 0 => 'dbxref_id', 10056 ), 10057 ), 10058 'foreign keys' => array( 10059 'dbxref' => array( 10060 'table' => 'dbxref', 10061 'columns' => array( 10062 'dbxref_id' => 'dbxref_id', 10063 ), 10064 ), 10065 'pub' => array( 10066 'table' => 'pub', 10067 'columns' => array( 10068 'pub_id' => 'pub_id', 10069 ), 10070 ), 10071 'contact' => array( 10072 'table' => 'contact', 10073 'columns' => array( 10074 'contact_id' => 'contact_id', 10075 ), 10076 ), 10077 ), 10078 ); 10079 return $description; 10080 } 10094 function tripal_core_chado_schema_v1_11_study_assay() { 10095 $description = array( 10096 'table' => 'study_assay', 10097 'fields' => array( 10098 'study_assay_id' => array( 10099 'type' => 'serial', 10100 'not NULL' => '1', 10101 ), 10102 'study_id' => array( 10103 'type' => 'int', 10104 'not NULL' => '1', 10105 ), 10106 'assay_id' => array( 10107 'type' => 'int', 10108 'not NULL' => '1', 10109 ), 10110 ), 10111 'primary key' => array( 10112 0 => 'study_assay_id', 10113 ), 10114 'unique keys' => array( 10115 'study_assay_c1' => array( 10116 0 => 'study_id', 10117 1 => 'assay_id', 10118 ), 10119 ), 10120 'indexes' => array( 10121 'study_assay_idx1' => array( 10122 0 => 'study_id', 10123 ), 10124 'study_assay_idx2' => array( 10125 0 => 'assay_id', 10126 ), 10127 ), 10128 'foreign keys' => array( 10129 'assay' => array( 10130 'table' => 'assay', 10131 'columns' => array( 10132 'assay_id' => 'assay_id', 10133 ), 10134 ), 10135 'study' => array( 10136 'table' => 'study', 10137 'columns' => array( 10138 'study_id' => 'study_id', 10139 ), 10140 ), 10141 ), 10142 ); 10143 return $description; 10144 } 10158 function tripal_core_chado_schema_v1_11_studydesign() { 10159 $description = array( 10160 'table' => 'studydesign', 10161 'fields' => array( 10162 'studydesign_id' => array( 10163 'type' => 'serial', 10164 'not NULL' => '1', 10165 ), 10166 'study_id' => array( 10167 'type' => 'int', 10168 'not NULL' => '1', 10169 ), 10170 'description' => array( 10171 'type' => 'text', 10172 'not NULL' => '', 10173 ), 10174 ), 10175 'primary key' => array( 10176 0 => 'studydesign_id', 10177 ), 10178 'unique keys' => array( 10179 ), 10180 'indexes' => array( 10181 'studydesign_idx1' => array( 10182 0 => 'study_id', 10183 ), 10184 ), 10185 'foreign keys' => array( 10186 'study' => array( 10187 'table' => 'study', 10188 'columns' => array( 10189 'study_id' => 'study_id', 10190 ), 10191 ), 10192 ), 10193 ); 10194 return $description; 10195 } 10209 function tripal_core_chado_schema_v1_11_studydesignprop() { 10210 $description = array( 10211 'table' => 'studydesignprop', 10212 'fields' => array( 10213 'studydesignprop_id' => array( 10214 'type' => 'serial', 10215 'not NULL' => '1', 10216 ), 10217 'studydesign_id' => array( 10218 'type' => 'int', 10219 'not NULL' => '1', 10220 ), 10221 'type_id' => array( 10222 'type' => 'int', 10223 'not NULL' => '1', 10224 ), 10225 'value' => array( 10226 'type' => 'text', 10227 'not NULL' => '', 10228 ), 10229 'rank' => array( 10230 'type' => 'int', 10231 'not NULL' => '1', 10232 'default' => '0', 10233 ), 10234 ), 10235 'primary key' => array( 10236 0 => 'studydesignprop_id', 10237 ), 10238 'unique keys' => array( 10239 'studydesignprop_c1' => array( 10240 0 => 'studydesign_id', 10241 1 => 'type_id', 10242 2 => 'rank', 10243 ), 10244 ), 10245 'indexes' => array( 10246 'studydesignprop_idx1' => array( 10247 0 => 'studydesign_id', 10248 ), 10249 'studydesignprop_idx2' => array( 10250 0 => 'type_id', 10251 ), 10252 ), 10253 'foreign keys' => array( 10254 'cvterm' => array( 10255 'table' => 'cvterm', 10256 'columns' => array( 10257 'type_id' => 'cvterm_id', 10258 ), 10259 ), 10260 'studydesign' => array( 10261 'table' => 'studydesign', 10262 'columns' => array( 10263 'studydesign_id' => 'studydesign_id', 10264 ), 10265 ), 10266 ), 10267 ); 10268 return $description; 10269 } 10283 function tripal_core_chado_schema_v1_11_studyfactor() { 10284 $description = array( 10285 'table' => 'studyfactor', 10286 'fields' => array( 10287 'studyfactor_id' => array( 10288 'type' => 'serial', 10289 'not NULL' => '1', 10290 ), 10291 'studydesign_id' => array( 10292 'type' => 'int', 10293 'not NULL' => '1', 10294 ), 10295 'type_id' => array( 10296 'type' => 'int', 10297 'not NULL' => '', 10298 ), 10299 'name' => array( 10300 'type' => 'text', 10301 'not NULL' => '1', 10302 ), 10303 'description' => array( 10304 'type' => 'text', 10305 'not NULL' => '', 10306 ), 10307 ), 10308 'primary key' => array( 10309 0 => 'studyfactor_id', 10310 ), 10311 'unique keys' => array( 10312 ), 10313 'indexes' => array( 10314 'studyfactor_idx1' => array( 10315 0 => 'studydesign_id', 10316 ), 10317 'studyfactor_idx2' => array( 10318 0 => 'type_id', 10319 ), 10320 ), 10321 'foreign keys' => array( 10322 'cvterm' => array( 10323 'table' => 'cvterm', 10324 'columns' => array( 10325 'type_id' => 'cvterm_id', 10326 ), 10327 ), 10328 'studydesign' => array( 10329 'table' => 'studydesign', 10330 'columns' => array( 10331 'studydesign_id' => 'studydesign_id', 10332 ), 10333 ), 10334 ), 10335 ); 10336 return $description; 10337 } 10351 function tripal_core_chado_schema_v1_11_studyfactorvalue() { 10352 $description = array( 10353 'table' => 'studyfactorvalue', 10354 'fields' => array( 10355 'studyfactorvalue_id' => array( 10356 'type' => 'serial', 10357 'not NULL' => '1', 10358 ), 10359 'studyfactor_id' => array( 10360 'type' => 'int', 10361 'not NULL' => '1', 10362 ), 10363 'assay_id' => array( 10364 'type' => 'int', 10365 'not NULL' => '1', 10366 ), 10367 'factorvalue' => array( 10368 'type' => 'text', 10369 'not NULL' => '', 10370 ), 10371 'name' => array( 10372 'type' => 'text', 10373 'not NULL' => '', 10374 ), 10375 'rank' => array( 10376 'type' => 'int', 10377 'not NULL' => '1', 10378 'default' => '0', 10379 ), 10380 ), 10381 'primary key' => array( 10382 0 => 'studyfactorvalue_id', 10383 ), 10384 'unique keys' => array( 10385 ), 10386 'indexes' => array( 10387 'studyfactorvalue_idx1' => array( 10388 0 => 'studyfactor_id', 10389 ), 10390 'studyfactorvalue_idx2' => array( 10391 0 => 'assay_id', 10392 ), 10393 ), 10394 'foreign keys' => array( 10395 'assay' => array( 10396 'table' => 'assay', 10397 'columns' => array( 10398 'assay_id' => 'assay_id', 10399 ), 10400 ), 10401 'studyfactor' => array( 10402 'table' => 'studyfactor', 10403 'columns' => array( 10404 'studyfactor_id' => 'studyfactor_id', 10405 ), 10406 ), 10407 ), 10408 ); 10409 return $description; 10410 } 10424 function tripal_core_chado_schema_v1_11_studyprop() { 10425 $description = array( 10426 'table' => 'studyprop', 10427 'fields' => array( 10428 'studyprop_id' => array( 10429 'type' => 'serial', 10430 'not NULL' => '1', 10431 ), 10432 'study_id' => array( 10433 'type' => 'int', 10434 'not NULL' => '1', 10435 ), 10436 'type_id' => array( 10437 'type' => 'int', 10438 'not NULL' => '1', 10439 ), 10440 'value' => array( 10441 'type' => 'text', 10442 'not NULL' => '', 10443 ), 10444 'rank' => array( 10445 'type' => 'int', 10446 'not NULL' => '1', 10447 'default' => '0', 10448 ), 10449 ), 10450 'primary key' => array( 10451 0 => 'studyprop_id', 10452 ), 10453 'unique keys' => array( 10454 'study_id' => array( 10455 0 => 'study_id', 10456 1 => 'type_id', 10457 2 => 'rank', 10458 ), 10459 ), 10460 'indexes' => array( 10461 'studyprop_idx1' => array( 10462 0 => 'study_id', 10463 ), 10464 'studyprop_idx2' => array( 10465 0 => 'type_id', 10466 ), 10467 ), 10468 'foreign keys' => array( 10469 'cvterm' => array( 10470 'table' => 'cvterm', 10471 'columns' => array( 10472 'type_id' => 'cvterm_id', 10473 ), 10474 ), 10475 'study' => array( 10476 'table' => 'study', 10477 'columns' => array( 10478 'study_id' => 'study_id', 10479 ), 10480 ), 10481 ), 10482 ); 10483 return $description; 10484 } 10498 function tripal_core_chado_schema_v1_11_studyprop_feature() { 10499 $description = array( 10500 'table' => 'studyprop_feature', 10501 'fields' => array( 10502 'studyprop_feature_id' => array( 10503 'type' => 'serial', 10504 'not NULL' => '1', 10505 ), 10506 'studyprop_id' => array( 10507 'type' => 'int', 10508 'not NULL' => '1', 10509 ), 10510 'feature_id' => array( 10511 'type' => 'int', 10512 'not NULL' => '1', 10513 ), 10514 'type_id' => array( 10515 'type' => 'int', 10516 'not NULL' => '', 10517 ), 10518 ), 10519 'primary key' => array( 10520 0 => 'studyprop_feature_id', 10521 ), 10522 'unique keys' => array( 10523 'studyprop_id' => array( 10524 0 => 'studyprop_id', 10525 1 => 'feature_id', 10526 ), 10527 ), 10528 'indexes' => array( 10529 'studyprop_feature_idx1' => array( 10530 0 => 'studyprop_id', 10531 ), 10532 'studyprop_feature_idx2' => array( 10533 0 => 'feature_id', 10534 ), 10535 ), 10536 'foreign keys' => array( 10537 'cvterm' => array( 10538 'table' => 'cvterm', 10539 'columns' => array( 10540 'type_id' => 'cvterm_id', 10541 ), 10542 ), 10543 'feature' => array( 10544 'table' => 'feature', 10545 'columns' => array( 10546 'feature_id' => 'feature_id', 10547 ), 10548 ), 10549 'studyprop' => array( 10550 'table' => 'studyprop', 10551 'columns' => array( 10552 'studyprop_id' => 'studyprop_id', 10553 ), 10554 ), 10555 ), 10556 ); 10557 return $description; 10558 } 10572 function tripal_core_chado_schema_v1_11_synonym() { 10573 $description = array( 10574 'table' => 'synonym', 10575 'fields' => array( 10576 'synonym_id' => array( 10577 'type' => 'serial', 10578 'not NULL' => '1', 10579 ), 10580 'name' => array( 10581 'type' => 'varchar', 10582 'length' => '255', 10583 'not NULL' => '1', 10584 ), 10585 'type_id' => array( 10586 'type' => 'int', 10587 'not NULL' => '1', 10588 ), 10589 'synonym_sgml' => array( 10590 'type' => 'varchar', 10591 'length' => '255', 10592 'not NULL' => '1', 10593 ), 10594 ), 10595 'primary key' => array( 10596 0 => 'synonym_id', 10597 ), 10598 'unique keys' => array( 10599 'synonym_c1' => array( 10600 0 => 'name', 10601 1 => 'type_id', 10602 ), 10603 ), 10604 'indexes' => array( 10605 'synonym_idx1' => array( 10606 0 => 'type_id', 10607 ), 10608 ), 10609 'foreign keys' => array( 10610 'cvterm' => array( 10611 'table' => 'cvterm', 10612 'columns' => array( 10613 'type_id' => 'cvterm_id', 10614 ), 10615 ), 10616 ), 10617 ); 10618 return $description; 10619 } 10633 function tripal_core_chado_schema_v1_11_tableinfo() { 10634 $description = array( 10635 'table' => 'tableinfo', 10636 'fields' => array( 10637 'tableinfo_id' => array( 10638 'type' => 'serial', 10639 'not NULL' => '1', 10640 ), 10641 'name' => array( 10642 'type' => 'varchar', 10643 'length' => '30', 10644 'not NULL' => '1', 10645 ), 10646 'primary_key_column' => array( 10647 'type' => 'varchar', 10648 'length' => '30', 10649 'not NULL' => '', 10650 ), 10651 'is_view' => array( 10652 'type' => 'int', 10653 'not NULL' => '1', 10654 'default' => '0', 10655 ), 10656 'view_on_table_id' => array( 10657 'type' => 'int', 10658 'not NULL' => '', 10659 ), 10660 'superclass_table_id' => array( 10661 'type' => 'int', 10662 'not NULL' => '', 10663 ), 10664 'is_updateable' => array( 10665 'type' => 'int', 10666 'not NULL' => '1', 10667 'default' => '1', 10668 ), 10669 'modification_date' => array( 10670 'type' => 'date', 10671 'not NULL' => '1', 10672 'default' => 'ow(', 10673 ), 10674 ), 10675 'primary key' => array( 10676 0 => 'tableinfo_id', 10677 ), 10678 'unique keys' => array( 10679 'tableinfo_c1' => array( 10680 0 => 'name', 10681 ), 10682 ), 10683 'indexes' => array( 10684 ), 10685 'foreign keys' => array( 10686 ), 10687 ); 10688 return $description; 10689 } 10703 function tripal_core_chado_schema_v1_11_treatment() { 10704 $description = array( 10705 'table' => 'treatment', 10706 'fields' => array( 10707 'treatment_id' => array( 10708 'type' => 'serial', 10709 'not NULL' => '1', 10710 ), 10711 'rank' => array( 10712 'type' => 'int', 10713 'not NULL' => '1', 10714 'default' => '0', 10715 ), 10716 'biomaterial_id' => array( 10717 'type' => 'int', 10718 'not NULL' => '1', 10719 ), 10720 'type_id' => array( 10721 'type' => 'int', 10722 'not NULL' => '1', 10723 ), 10724 'protocol_id' => array( 10725 'type' => 'int', 10726 'not NULL' => '', 10727 ), 10728 'name' => array( 10729 'type' => 'text', 10730 'not NULL' => '', 10731 ), 10732 ), 10733 'primary key' => array( 10734 0 => 'treatment_id', 10735 ), 10736 'unique keys' => array( 10737 ), 10738 'indexes' => array( 10739 'treatment_idx1' => array( 10740 0 => 'biomaterial_id', 10741 ), 10742 'treatment_idx2' => array( 10743 0 => 'type_id', 10744 ), 10745 'treatment_idx3' => array( 10746 0 => 'protocol_id', 10747 ), 10748 ), 10749 'foreign keys' => array( 10750 'cvterm' => array( 10751 'table' => 'cvterm', 10752 'columns' => array( 10753 'type_id' => 'cvterm_id', 10754 ), 10755 ), 10756 'protocol' => array( 10757 'table' => 'protocol', 10758 'columns' => array( 10759 'protocol_id' => 'protocol_id', 10760 ), 10761 ), 10762 'biomaterial' => array( 10763 'table' => 'biomaterial', 10764 'columns' => array( 10765 'biomaterial_id' => 'biomaterial_id', 10766 ), 10767 ), 10768 ), 10769 ); 10770 return $description; 10771 } 10772 10782 function tripal_core_chado_get_v1_11_tables() { 10783 $tables = array( 10784 'acquisition', 10785 'acquisition_relationship', 10786 'acquisitionprop', 10787 'analysis', 10788 'analysisfeature', 10789 'analysisfeatureprop', 10790 'analysisprop', 10791 'arraydesign', 10792 'arraydesignprop', 10793 'assay', 10794 'assay_biomaterial', 10795 'assay_project', 10796 'assayprop', 10797 'biomaterial', 10798 'biomaterial_dbxref', 10799 'biomaterial_relationship', 10800 'biomaterial_treatment', 10801 'biomaterialprop', 10802 'cell_line', 10803 'cell_line_cvterm', 10804 'cell_line_cvtermprop', 10805 'cell_line_dbxref', 10806 'cell_line_feature', 10807 'cell_line_library', 10808 'cell_line_pub', 10809 'cell_line_relationship', 10810 'cell_line_synonym', 10811 'cell_lineprop', 10812 'cell_lineprop_pub', 10813 'channel', 10814 'contact', 10815 'contact_relationship', 10816 'control', 10817 'cv', 10818 'cvterm', 10819 'cvterm_dbxref', 10820 'cvterm_relationship', 10821 'cvtermpath', 10822 'cvtermprop', 10823 'cvtermsynonym', 10824 'db', 10825 'dbxref', 10826 'dbxrefprop', 10827 'eimage', 10828 'element', 10829 'element_relationship', 10830 'elementresult', 10831 'elementresult_relationship', 10832 'environment', 10833 'environment_cvterm', 10834 'expression', 10835 'expression_cvterm', 10836 'expression_cvtermprop', 10837 'expression_image', 10838 'expression_pub', 10839 'expressionprop', 10840 'feature', 10841 'feature_cvterm', 10842 'feature_cvterm_dbxref', 10843 'feature_cvterm_pub', 10844 'feature_cvtermprop', 10845 'feature_dbxref', 10846 'feature_expression', 10847 'feature_expressionprop', 10848 'feature_genotype', 10849 'feature_phenotype', 10850 'feature_pub', 10851 'feature_pubprop', 10852 'feature_relationship', 10853 'feature_relationship_pub', 10854 'feature_relationshipprop', 10855 'feature_relationshipprop_pub', 10856 'feature_synonym', 10857 'featureloc', 10858 'featureloc_pub', 10859 'featuremap', 10860 'featuremap_pub', 10861 'featurepos', 10862 'featureprop', 10863 'featureprop_pub', 10864 'featurerange', 10865 'genotype', 10866 'library', 10867 'library_cvterm', 10868 'library_dbxref', 10869 'library_feature', 10870 'library_pub', 10871 'library_synonym', 10872 'libraryprop', 10873 'libraryprop_pub', 10874 'magedocumentation', 10875 'mageml', 10876 'materialized_view', 10877 'organism', 10878 'organism_dbxref', 10879 'organismprop', 10880 'phendesc', 10881 'phenotype', 10882 'phenotype_comparison', 10883 'phenotype_comparison_cvterm', 10884 'phenotype_cvterm', 10885 'phenstatement', 10886 'phylonode', 10887 'phylonode_dbxref', 10888 'phylonode_organism', 10889 'phylonode_pub', 10890 'phylonode_relationship', 10891 'phylonodeprop', 10892 'phylotree', 10893 'phylotree_pub', 10894 'project', 10895 'protocol', 10896 'protocolparam', 10897 'pub', 10898 'pub_dbxref', 10899 'pub_relationship', 10900 'pubauthor', 10901 'pubprop', 10902 'quantification', 10903 'quantification_relationship', 10904 'quantificationprop', 10905 'stock', 10906 'stock_cvterm', 10907 'stock_dbxref', 10908 'stock_genotype', 10909 'stock_pub', 10910 'stock_relationship', 10911 'stock_relationship_pub', 10912 'stockcollection', 10913 'stockcollection_stock', 10914 'stockcollectionprop', 10915 'stockprop', 10916 'stockprop_pub', 10917 'study', 10918 'study_assay', 10919 'studydesign', 10920 'studydesignprop', 10921 'studyfactor', 10922 'studyfactorvalue', 10923 'studyprop', 10924 'studyprop_feature', 10925 'synonym', 10926 'tableinfo', 10927 'treatment' 10928 ); 10929 return $tables; 10930 }