tripal_natural_diversity.api.inc 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  1. <?php
  2. /**
  3. * @file
  4. * @todo Add file header description
  5. */
  6. /**
  7. * Implements hook_chado_schema_v1_11_table()
  8. *
  9. * Purpose: To add descriptions and foreign keys to default table description
  10. * Note: This array will be merged with the array from all other implementations
  11. *
  12. * @return
  13. * Array describing the nd_experiment table
  14. *
  15. * @ingroup tripal_schema_api
  16. */
  17. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment() {
  18. $description = array();
  19. $description = array(
  20. 'table' => 'nd_experiment',
  21. 'fields' => array(
  22. 'nd_experiment_id' => array(
  23. 'type' => 'serial',
  24. 'not null' => '1',
  25. ),
  26. 'type_id' => array(
  27. 'type' => 'int',
  28. 'not null' => '1',
  29. ),
  30. 'nd_geolocation_id' => array(
  31. 'type' => 'int',
  32. 'not null' => '1',
  33. ),
  34. ),
  35. 'primary key' => array(
  36. '0' => 'nd_experiment_id',
  37. ),
  38. 'foreign keys' => array(
  39. 'nd_geolocation' => array(
  40. 'table' => 'nd_geolocation',
  41. 'columns' => array(
  42. 'nd_geolocation_id' => 'nd_geolocation_id',
  43. ),
  44. ),
  45. 'cvterm' => array(
  46. 'table' => 'cvterm',
  47. 'columns' => array(
  48. 'type_id' => 'cvterm_id',
  49. ),
  50. ),
  51. ),
  52. 'referring_tables' => array(
  53. 'nd_experiment_contact',
  54. 'nd_experiment_dbxref',
  55. 'nd_experiment_genotype',
  56. 'nd_experiment_phenotype',
  57. 'nd_experiment_project',
  58. 'nd_experiment_protocol',
  59. 'nd_experiment_pub',
  60. 'nd_experiment_stock',
  61. 'nd_experimentprop'
  62. ),
  63. );
  64. return $description;
  65. }
  66. /**
  67. * Implements hook_chado_schema_v1_2_table()
  68. *
  69. * Purpose: To add descriptions and foreign keys to default table description
  70. * Note: This array will be merged with the array from all other implementations
  71. *
  72. * @return
  73. * Array describing the nd_experiment table
  74. *
  75. * @ingroup tripal_schema_api
  76. */
  77. function tripal_natural_diversity_chado_schema_v1_2_nd_experiment() {
  78. $description = array();
  79. $description = array(
  80. 'referring_tables' => array(
  81. 'nd_experiment_contact',
  82. 'nd_experiment_dbxref',
  83. 'nd_experiment_genotype',
  84. 'nd_experiment_phenotype',
  85. 'nd_experiment_project',
  86. 'nd_experiment_protocol',
  87. 'nd_experiment_pub',
  88. 'nd_experiment_stock',
  89. 'nd_experimentprop'
  90. ),
  91. );
  92. return $description;
  93. }
  94. /**
  95. * Implements hook_chado_schema_v1_11_table()
  96. *
  97. * Purpose: To add descriptions and foreign keys to default table description
  98. * Note: This array will be merged with the array from all other implementations
  99. *
  100. * @return
  101. * Array describing the nd_experiment_contact table
  102. *
  103. * @ingroup tripal_schema_api
  104. */
  105. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_contact() {
  106. $description = array();
  107. $description = array(
  108. 'table' => 'nd_experiment_contact',
  109. 'fields' => array(
  110. 'nd_experiment_contact_id' => array(
  111. 'type' => 'serial',
  112. 'not null' => '1',
  113. ),
  114. 'contact_id' => array(
  115. 'type' => 'int',
  116. 'not null' => '1',
  117. ),
  118. 'nd_experiment_id' => array(
  119. 'type' => 'int',
  120. 'not null' => '1',
  121. ),
  122. ),
  123. 'primary key' => array(
  124. '0' => 'nd_experiment_contact_id',
  125. ),
  126. 'foreign keys' => array(
  127. 'nd_experiment' => array(
  128. 'table' => 'nd_experiment',
  129. 'columns' => array(
  130. 'nd_experiment_id' => 'nd_experiment_id',
  131. ),
  132. ),
  133. 'contact' => array(
  134. 'table' => 'contact',
  135. 'columns' => array(
  136. 'contact_id' => 'contact_id',
  137. ),
  138. ),
  139. ),
  140. 'referring_tables' => array(
  141. ),
  142. );
  143. return $description;
  144. }
  145. /**
  146. * Implements hook_chado_schema_v1_11_table()
  147. *
  148. * Purpose: To add descriptions and foreign keys to default table description
  149. * Note: This array will be merged with the array from all other implementations
  150. *
  151. * @return
  152. * Array describing the nd_experiment_dbxref table
  153. *
  154. * @ingroup tripal_schema_api
  155. */
  156. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_dbxref() {
  157. $description = array();
  158. $description = array(
  159. 'table' => 'nd_experiment_dbxref',
  160. 'fields' => array(
  161. 'nd_experiment_dbxref_id' => array(
  162. 'type' => 'serial',
  163. 'not null' => '1',
  164. ),
  165. 'dbxref_id' => array(
  166. 'type' => 'int',
  167. 'not null' => '1',
  168. ),
  169. 'nd_experiment_id' => array(
  170. 'type' => 'int',
  171. 'not null' => '1',
  172. ),
  173. ),
  174. 'primary key' => array(
  175. '0' => 'nd_experiment_dbxref_id',
  176. ),
  177. 'foreign keys' => array(
  178. 'nd_experiment' => array(
  179. 'table' => 'nd_experiment',
  180. 'columns' => array(
  181. 'nd_experiment_id' => 'nd_experiment_id',
  182. ),
  183. ),
  184. 'dbxref' => array(
  185. 'table' => 'dbxref',
  186. 'columns' => array(
  187. 'dbxref_id' => 'dbxref_id',
  188. ),
  189. ),
  190. ),
  191. 'referring_tables' => array(
  192. ),
  193. );
  194. return $description;
  195. }
  196. /**
  197. * Implements hook_chado_schema_v1_11_table()
  198. *
  199. * Purpose: To add descriptions and foreign keys to default table description
  200. * Note: This array will be merged with the array from all other implementations
  201. *
  202. * @return
  203. * Array describing the nd_experiment_genotype table
  204. *
  205. * @ingroup tripal_schema_api
  206. */
  207. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_genotype() {
  208. $description = array();
  209. $description = array(
  210. 'table' => 'nd_experiment_genotype',
  211. 'fields' => array(
  212. 'nd_experiment_genotype_id' => array(
  213. 'type' => 'serial',
  214. 'not null' => '1',
  215. ),
  216. 'genotype_id' => array(
  217. 'type' => 'int',
  218. 'not null' => '1',
  219. ),
  220. 'nd_experiment_id' => array(
  221. 'type' => 'int',
  222. 'not null' => '1',
  223. ),
  224. ),
  225. 'primary key' => array(
  226. '0' => 'nd_experiment_genotype_id',
  227. ),
  228. 'foreign keys' => array(
  229. 'nd_experiment' => array(
  230. 'table' => 'nd_experiment',
  231. 'columns' => array(
  232. 'nd_experiment_id' => 'nd_experiment_id',
  233. ),
  234. ),
  235. 'genotype' => array(
  236. 'table' => 'genotype',
  237. 'columns' => array(
  238. 'genotype_id' => 'genotype_id',
  239. ),
  240. ),
  241. ),
  242. 'referring_tables' => array(
  243. ),
  244. );
  245. return $description;
  246. }
  247. /**
  248. * Implements hook_chado_schema_v1_11_table()
  249. *
  250. * Purpose: To add descriptions and foreign keys to default table description
  251. * Note: This array will be merged with the array from all other implementations
  252. *
  253. * @return
  254. * Array describing the nd_experiment_phenotype table
  255. *
  256. * @ingroup tripal_schema_api
  257. */
  258. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_phenotype() {
  259. $description = array();
  260. $description = array(
  261. 'table' => 'nd_experiment_phenotype',
  262. 'fields' => array(
  263. 'nd_experiment_phenotype_id' => array(
  264. 'type' => 'serial',
  265. 'not null' => '1',
  266. ),
  267. 'phenotype_id' => array(
  268. 'type' => 'int',
  269. 'not null' => '1',
  270. ),
  271. 'nd_experiment_id' => array(
  272. 'type' => 'int',
  273. 'not null' => '1',
  274. ),
  275. ),
  276. 'primary key' => array(
  277. '0' => 'nd_experiment_phenotype_id',
  278. ),
  279. 'foreign keys' => array(
  280. 'nd_experiment' => array(
  281. 'table' => 'nd_experiment',
  282. 'columns' => array(
  283. 'nd_experiment_id' => 'nd_experiment_id',
  284. ),
  285. ),
  286. 'phenotype' => array(
  287. 'table' => 'phenotype',
  288. 'columns' => array(
  289. 'phenotype_id' => 'phenotype_id',
  290. ),
  291. ),
  292. ),
  293. 'referring_tables' => array(
  294. ),
  295. );
  296. return $description;
  297. }
  298. /**
  299. * Implements hook_chado_schema_v1_11_table()
  300. *
  301. * Purpose: To add descriptions and foreign keys to default table description
  302. * Note: This array will be merged with the array from all other implementations
  303. *
  304. * @return
  305. * Array describing the nd_experiment_project table
  306. *
  307. * @ingroup tripal_schema_api
  308. */
  309. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_project() {
  310. $description = array();
  311. $description = array(
  312. 'table' => 'nd_experiment_project',
  313. 'fields' => array(
  314. 'nd_experiment_project_id' => array(
  315. 'type' => 'serial',
  316. 'not null' => '1',
  317. ),
  318. 'project_id' => array(
  319. 'type' => 'int',
  320. 'not null' => '1',
  321. ),
  322. 'nd_experiment_id' => array(
  323. 'type' => 'int',
  324. 'not null' => '1',
  325. ),
  326. ),
  327. 'primary key' => array(
  328. '0' => 'nd_experiment_project_id',
  329. ),
  330. 'foreign keys' => array(
  331. 'nd_experiment' => array(
  332. 'table' => 'nd_experiment',
  333. 'columns' => array(
  334. 'nd_experiment_id' => 'nd_experiment_id',
  335. ),
  336. ),
  337. 'project' => array(
  338. 'table' => 'project',
  339. 'columns' => array(
  340. 'project_id' => 'project_id',
  341. ),
  342. ),
  343. ),
  344. 'referring_tables' => array(
  345. ),
  346. );
  347. return $description;
  348. }
  349. /**
  350. * Implements hook_chado_schema_v1_11_table()
  351. *
  352. * Purpose: To add descriptions and foreign keys to default table description
  353. * Note: This array will be merged with the array from all other implementations
  354. *
  355. * @return
  356. * Array describing the nd_experiment_protocol table
  357. *
  358. * @ingroup tripal_schema_api
  359. */
  360. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_protocol() {
  361. $description = array();
  362. $description = array(
  363. 'table' => 'nd_experiment_protocol',
  364. 'fields' => array(
  365. 'nd_experiment_protocol_id' => array(
  366. 'type' => 'serial',
  367. 'not null' => '1',
  368. ),
  369. 'protocol_id' => array(
  370. 'type' => 'int',
  371. 'not null' => '1',
  372. ),
  373. 'nd_experiment_id' => array(
  374. 'type' => 'int',
  375. 'not null' => '1',
  376. ),
  377. ),
  378. 'primary key' => array(
  379. '0' => 'nd_experiment_protocol_id',
  380. ),
  381. 'foreign keys' => array(
  382. 'nd_experiment' => array(
  383. 'table' => 'nd_experiment',
  384. 'columns' => array(
  385. 'nd_experiment_id' => 'nd_experiment_id',
  386. ),
  387. ),
  388. 'protocol' => array(
  389. 'table' => 'protocol',
  390. 'columns' => array(
  391. 'protocol_id' => 'protocol_id',
  392. ),
  393. ),
  394. ),
  395. 'referring_tables' => array(
  396. ),
  397. );
  398. return $description;
  399. }
  400. /**
  401. * Implements hook_chado_schema_v1_11_table()
  402. *
  403. * Purpose: To add descriptions and foreign keys to default table description
  404. * Note: This array will be merged with the array from all other implementations
  405. *
  406. * @return
  407. * Array describing the nd_experiment_pub table
  408. *
  409. * @ingroup tripal_schema_api
  410. */
  411. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_pub() {
  412. $description = array();
  413. $description = array(
  414. 'table' => 'nd_experiment_pub',
  415. 'fields' => array(
  416. 'nd_experiment_pub_id' => array(
  417. 'type' => 'serial',
  418. 'not null' => '1',
  419. ),
  420. 'pub_id' => array(
  421. 'type' => 'int',
  422. 'not null' => '1',
  423. ),
  424. 'nd_experiment_id' => array(
  425. 'type' => 'int',
  426. 'not null' => '1',
  427. ),
  428. ),
  429. 'primary key' => array(
  430. '0' => 'nd_experiment_pub_id',
  431. ),
  432. 'foreign keys' => array(
  433. 'nd_experiment' => array(
  434. 'table' => 'nd_experiment',
  435. 'columns' => array(
  436. 'nd_experiment_id' => 'nd_experiment_id',
  437. ),
  438. ),
  439. 'pub' => array(
  440. 'table' => 'pub',
  441. 'columns' => array(
  442. 'pub_id' => 'pub_id',
  443. ),
  444. ),
  445. ),
  446. 'referring_tables' => array(
  447. ),
  448. );
  449. return $description;
  450. }
  451. /**
  452. * Implements hook_chado_schema_v1_11_table()
  453. *
  454. * Purpose: To add descriptions and foreign keys to default table description
  455. * Note: This array will be merged with the array from all other implementations
  456. *
  457. * @return
  458. * Array describing the nd_experiment_stock table
  459. *
  460. * @ingroup tripal_schema_api
  461. */
  462. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_stock() {
  463. $description = array();
  464. $description = array(
  465. 'table' => 'nd_experiment_stock',
  466. 'fields' => array(
  467. 'nd_experiment_stock_id' => array(
  468. 'type' => 'serial',
  469. 'not null' => '1',
  470. ),
  471. 'stock_id' => array(
  472. 'type' => 'int',
  473. 'not null' => '1',
  474. ),
  475. 'nd_experiment_id' => array(
  476. 'type' => 'int',
  477. 'not null' => '1',
  478. ),
  479. 'type_id' => array(
  480. 'type' => 'int',
  481. 'not null' => '1',
  482. ),
  483. ),
  484. 'primary key' => array(
  485. '0' => 'nd_experiment_stock_id',
  486. ),
  487. 'foreign keys' => array(
  488. 'nd_experiment' => array(
  489. 'table' => 'nd_experiment',
  490. 'columns' => array(
  491. 'nd_experiment_id' => 'nd_experiment_id',
  492. ),
  493. ),
  494. 'stock' => array(
  495. 'table' => 'stock',
  496. 'columns' => array(
  497. 'stock_id' => 'stock_id',
  498. ),
  499. ),
  500. 'cvterm' => array(
  501. 'table' => 'cvterm',
  502. 'columns' => array(
  503. 'type_id' => 'cvterm_id',
  504. ),
  505. ),
  506. ),
  507. 'referring_tables' => array(
  508. 'nd_experiment_stock_dbxref',
  509. 'nd_experiment_stockprop',
  510. ),
  511. );
  512. return $description;
  513. }
  514. /**
  515. * Implements hook_chado_schema_v1_2_table()
  516. *
  517. * Purpose: To add descriptions and foreign keys to default table description
  518. * Note: This array will be merged with the array from all other implementations
  519. *
  520. * @return
  521. * Array describing the nd_experiment_stock table
  522. *
  523. * @ingroup tripal_schema_api
  524. */
  525. function tripal_natural_diversity_chado_schema_v1_2_nd_experiment_stock() {
  526. $description = array();
  527. $description = array(
  528. 'referring_tables' => array(
  529. 'nd_experiment_stock_dbxref',
  530. 'nd_experiment_stockprop',
  531. ),
  532. );
  533. return $description;
  534. }
  535. /**
  536. * Implements hook_chado_schema_v1_11_table()
  537. *
  538. * Purpose: To add descriptions and foreign keys to default table description
  539. * Note: This array will be merged with the array from all other implementations
  540. *
  541. * @return
  542. * Array describing the nd_experiment_stockprop table
  543. *
  544. * @ingroup tripal_schema_api
  545. */
  546. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_stockprop() {
  547. $description = array();
  548. $description = array(
  549. 'table' => 'nd_experiment_stockprop',
  550. 'fields' => array(
  551. 'nd_experiment_stockprop_id' => array(
  552. 'type' => 'serial',
  553. 'not null' => '1',
  554. ),
  555. 'nd_experiment_stock_id' => array(
  556. 'type' => 'int',
  557. 'not null' => '1',
  558. ),
  559. 'type_id' => array(
  560. 'type' => 'int',
  561. 'not null' => '1',
  562. ),
  563. 'value' => array(
  564. 'type' => 'varchar',
  565. ),
  566. 'rank' => array(
  567. 'type' => 'int',
  568. 'not null' => 1,
  569. 'default' => 1
  570. ),
  571. ),
  572. 'primary key' => array(
  573. '0' => 'nd_experiment_stockprop_id',
  574. ),
  575. 'foreign keys' => array(
  576. 'nd_experiment_stock' => array(
  577. 'table' => 'nd_experiment_stock',
  578. 'columns' => array(
  579. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  580. ),
  581. ),
  582. 'cvterm' => array(
  583. 'table' => 'cvterm',
  584. 'columns' => array(
  585. 'type_id' => 'cvterm_id',
  586. ),
  587. ),
  588. ),
  589. 'referring_tables' => array(
  590. ),
  591. );
  592. return $description;
  593. }
  594. /**
  595. * Implements hook_chado_schema_v1_11_table()
  596. *
  597. * Purpose: To add descriptions and foreign keys to default table description
  598. * Note: This array will be merged with the array from all other implementations
  599. *
  600. * @return
  601. * Array describing the nd_experiment_stock_dbxref table
  602. *
  603. * @ingroup tripal_schema_api
  604. */
  605. function tripal_natural_diversity_chado_schema_v1_11_nd_experiment_stock_dbxref() {
  606. $description = array();
  607. $description = array(
  608. 'table' => 'nd_experiment_stock_dbxref',
  609. 'fields' => array(
  610. 'nd_experiment_stock_dbxref_id' => array(
  611. 'type' => 'serial',
  612. 'not null' => '1',
  613. ),
  614. 'nd_experiment_stock_id' => array(
  615. 'type' => 'int',
  616. 'not null' => '1',
  617. ),
  618. 'dbxref_id' => array(
  619. 'type' => 'int',
  620. 'not null' => '1',
  621. ),
  622. ),
  623. 'primary key' => array(
  624. '0' => 'nd_experiment_stock_dbxref_id',
  625. ),
  626. 'foreign keys' => array(
  627. 'nd_experiment_stock' => array(
  628. 'table' => 'nd_experiment_stock',
  629. 'columns' => array(
  630. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  631. ),
  632. ),
  633. 'dbxref' => array(
  634. 'table' => 'dbxref',
  635. 'columns' => array(
  636. 'dbxref_id' => 'dbxref_id',
  637. ),
  638. ),
  639. ),
  640. 'referring_tables' => array(
  641. ),
  642. );
  643. return $description;
  644. }
  645. /**
  646. * Implements hook_chado_schema_v1_11_table()
  647. *
  648. * Purpose: To add descriptions and foreign keys to default table description
  649. * Note: This array will be merged with the array from all other implementations
  650. *
  651. * @return
  652. * Array describing the nd_experimentprop table
  653. *
  654. * @ingroup tripal_schema_api
  655. */
  656. function tripal_natural_diversity_chado_schema_v1_11_nd_experimentprop() {
  657. $description = array();
  658. $description = array(
  659. 'table' => 'nd_experimentprop',
  660. 'fields' => array(
  661. 'nd_experimentprop_id' => array(
  662. 'type' => 'serial',
  663. 'not null' => '1',
  664. ),
  665. 'nd_experiment_id' => array(
  666. 'type' => 'int',
  667. 'not null' => '1',
  668. ),
  669. 'type_id' => array(
  670. 'type' => 'int',
  671. 'not null' => '1',
  672. ),
  673. 'value' => array(
  674. 'type' => 'varchar',
  675. ),
  676. 'rank' => array(
  677. 'type' => 'int',
  678. 'not null' => 1,
  679. 'default' => 1
  680. ),
  681. ),
  682. 'primary key' => array(
  683. '0' => 'nd_experimentprop_id',
  684. ),
  685. 'foreign keys' => array(
  686. 'nd_experiment' => array(
  687. 'table' => 'nd_experiment',
  688. 'columns' => array(
  689. 'nd_experiment_id' => 'nd_experiment_id',
  690. ),
  691. ),
  692. 'cvterm' => array(
  693. 'table' => 'cvterm',
  694. 'columns' => array(
  695. 'type_id' => 'cvterm_id',
  696. ),
  697. ),
  698. ),
  699. 'referring_tables' => array(
  700. ),
  701. );
  702. return $description;
  703. }
  704. /**
  705. * Implements hook_chado_schema_v1_11_table()
  706. *
  707. * Purpose: To add descriptions and foreign keys to default table description
  708. * Note: This array will be merged with the array from all other implementations
  709. *
  710. * @return
  711. * Array describing the nd_geolocation table
  712. *
  713. * @ingroup tripal_schema_api
  714. */
  715. function tripal_natural_diversity_chado_schema_v1_11_nd_geolocation() {
  716. $description = array();
  717. $description = array(
  718. 'table' => 'nd_reagent',
  719. 'fields' => array(
  720. 'nd_geolocation_id' => array(
  721. 'type' => 'serial',
  722. 'not null' => '1',
  723. ),
  724. 'description' => array(
  725. 'type' => 'varchar'
  726. ),
  727. 'latitude' => array(
  728. 'type' => 'real',
  729. ),
  730. 'longitude' => array(
  731. 'type' => 'real',
  732. ),
  733. 'altitude' => array(
  734. 'type' => 'real',
  735. ),
  736. 'geodetic_datum' => array(
  737. 'type' => 'varchar',
  738. ),
  739. ),
  740. 'primary key' => array(
  741. '0' => 'nd_geolocation_id',
  742. ),
  743. 'referring_tables' => array(
  744. 'nd_experiment',
  745. 'nd_geolocationprop'
  746. ),
  747. );
  748. return $description;
  749. }
  750. /**
  751. * Implements hook_chado_schema_v1_2_table()
  752. *
  753. * Purpose: To add descriptions and foreign keys to default table description
  754. * Note: This array will be merged with the array from all other implementations
  755. *
  756. * @return
  757. * Array describing the nd_geolocation table
  758. *
  759. * @ingroup tripal_schema_api
  760. */
  761. function tripal_natural_diversity_chado_schema_v1_2_nd_geolocation() {
  762. $description = array();
  763. $description = array(
  764. 'referring_tables' => array(
  765. 'nd_experiment',
  766. 'nd_geolocationprop'
  767. ),
  768. );
  769. return $description;
  770. }
  771. /**
  772. * Implements hook_chado_schema_v1_11_table()
  773. *
  774. * Purpose: To add descriptions and foreign keys to default table description
  775. * Note: This array will be merged with the array from all other implementations
  776. *
  777. * @return
  778. * Array describing the nd_geolocationprop table
  779. *
  780. * @ingroup tripal_schema_api
  781. */
  782. function tripal_natural_diversity_chado_schema_v1_11_nd_geolocationprop() {
  783. $description = array();
  784. $description = array(
  785. 'table' => 'nd_geolocationprop',
  786. 'fields' => array(
  787. 'nd_geolocationprop_id' => array(
  788. 'type' => 'serial',
  789. 'not null' => '1',
  790. ),
  791. 'nd_geolocation_id' => array(
  792. 'type' => 'int',
  793. 'not null' => '1',
  794. ),
  795. 'type_id' => array(
  796. 'type' => 'int',
  797. 'not null' => '1',
  798. ),
  799. 'value' => array(
  800. 'type' => 'varchar',
  801. ),
  802. 'rank' => array(
  803. 'type' => 'int',
  804. 'not null' => 1,
  805. 'default' => 1
  806. ),
  807. ),
  808. 'primary key' => array(
  809. '0' => 'nd_geolocationprop_id',
  810. ),
  811. 'foreign keys' => array(
  812. 'nd_geolocation' => array(
  813. 'table' => 'nd_geolocation',
  814. 'columns' => array(
  815. 'nd_geolocation_id' => 'nd_geolocation_id',
  816. ),
  817. ),
  818. 'cvterm' => array(
  819. 'table' => 'cvterm',
  820. 'columns' => array(
  821. 'type_id' => 'cvterm_id',
  822. ),
  823. ),
  824. ),
  825. 'referring_tables' => array(
  826. ),
  827. );
  828. return $description;
  829. }
  830. /**
  831. * Implements hook_chado_schema_v1_11_table()
  832. *
  833. * Purpose: To add descriptions and foreign keys to default table description
  834. * Note: This array will be merged with the array from all other implementations
  835. *
  836. * @return
  837. * Array describing the nd_protocol table
  838. *
  839. * @ingroup tripal_schema_api
  840. */
  841. function tripal_natural_diversity_chado_schema_v1_11_nd_protocol() {
  842. $description = array();
  843. $description = array(
  844. 'table' => 'nd_protocol',
  845. 'fields' => array(
  846. 'nd_protocol_id' => array(
  847. 'type' => 'serial',
  848. 'not null' => 1,
  849. ),
  850. 'name' => array(
  851. 'type' => 'varchar',
  852. 'not null' => 1,
  853. ),
  854. ),
  855. 'primary key' => array(
  856. '0' => 'nd_protocol_id',
  857. ),
  858. 'referring_tables' => array(
  859. 'nd_experiment_protocol',
  860. 'nd_protocol_reagent',
  861. 'nd_protocolprop'
  862. ),
  863. );
  864. return $description;
  865. }
  866. /**
  867. * Implements hook_chado_schema_v1_2_table()
  868. *
  869. * Purpose: To add descriptions and foreign keys to default table description
  870. * Note: This array will be merged with the array from all other implementations
  871. *
  872. * @return
  873. * Array describing the nd_protocol table
  874. *
  875. * @ingroup tripal_schema_api
  876. */
  877. function tripal_natural_diversity_chado_schema_v1_2_nd_protocol() {
  878. $description = array();
  879. $description = array(
  880. 'referring_tables' => array(
  881. 'nd_experiment_protocol',
  882. 'nd_protocol_reagent',
  883. 'nd_protocolprop'
  884. ),
  885. );
  886. return $description;
  887. }
  888. /**
  889. * Implements hook_chado_schema_v1_11_table()
  890. *
  891. * Purpose: To add descriptions and foreign keys to default table description
  892. * Note: This array will be merged with the array from all other implementations
  893. *
  894. * @return
  895. * Array describing the nd_protocol_reagent table
  896. *
  897. * @ingroup tripal_schema_api
  898. */
  899. function tripal_natural_diversity_chado_schema_v1_11_nd_protocol_reagent() {
  900. $description = array();
  901. $description = array(
  902. 'table' => 'nd_protocol_reagent',
  903. 'fields' => array(
  904. 'nd_protocol_reagent_id' => array(
  905. 'type' => 'serial',
  906. 'not null' => 1,
  907. ),
  908. 'nd_protocol_id' => array(
  909. 'type' => 'int',
  910. 'not null' => 1,
  911. ),
  912. 'nd_reagent_id' => array(
  913. 'type' => 'int',
  914. 'not null' => 1,
  915. ),
  916. 'type_id' => array(
  917. 'type' => 'int',
  918. 'not null' => 1,
  919. ),
  920. ),
  921. 'primary key' => array(
  922. '0' => 'nd_protocol_reagent_id',
  923. ),
  924. 'foreign keys' => array(
  925. 'nd_protocol' => array(
  926. 'table' => 'nd_protocol',
  927. 'columns' => array(
  928. 'nd_protocol_id' => 'nd_protocol_id',
  929. ),
  930. ),
  931. 'nd_reagent' => array(
  932. 'table' => 'nd_reagent',
  933. 'columns' => array(
  934. 'nd_reagent_id' => 'nd_reagent_id',
  935. ),
  936. ),
  937. 'cvterm' => array(
  938. 'table' => 'cvterm',
  939. 'columns' => array(
  940. 'type_id' => 'cvterm_id',
  941. ),
  942. ),
  943. ),
  944. 'referring_tables' => array(
  945. ),
  946. );
  947. return $description;
  948. }
  949. /**
  950. * Implements hook_chado_schema_v1_11_table()
  951. *
  952. * Purpose: To add descriptions and foreign keys to default table description
  953. * Note: This array will be merged with the array from all other implementations
  954. *
  955. * @return
  956. * Array describing the nd_protocolprop table
  957. *
  958. * @ingroup tripal_schema_api
  959. */
  960. function tripal_natural_diversity_chado_schema_v1_11_nd_protocolprop() {
  961. $description = array();
  962. $description = array(
  963. 'table' => 'nd_protocolprop',
  964. 'fields' => array(
  965. 'nd_protocolprop_id' => array(
  966. 'type' => 'serial',
  967. 'not null' => '1',
  968. ),
  969. 'nd_protocol_id' => array(
  970. 'type' => 'int',
  971. 'not null' => '1',
  972. ),
  973. 'type_id' => array(
  974. 'type' => 'int',
  975. 'not null' => '1',
  976. ),
  977. 'value' => array(
  978. 'type' => 'varchar',
  979. ),
  980. 'rank' => array(
  981. 'type' => 'int',
  982. 'not null' => 1,
  983. 'default' => 1
  984. ),
  985. ),
  986. 'primary key' => array(
  987. '0' => 'nd_protocolprop_id',
  988. ),
  989. 'foreign keys' => array(
  990. 'nd_protocol' => array(
  991. 'table' => 'nd_protocol',
  992. 'columns' => array(
  993. 'nd_protocol_id' => 'nd_protocol_id',
  994. ),
  995. ),
  996. 'cvterm' => array(
  997. 'table' => 'cvterm',
  998. 'columns' => array(
  999. 'type_id' => 'cvterm_id',
  1000. ),
  1001. ),
  1002. ),
  1003. 'referring_tables' => array(
  1004. ),
  1005. );
  1006. return $description;
  1007. }
  1008. /**
  1009. * Implements hook_chado_schema_v1_11_table()
  1010. *
  1011. * Purpose: To add descriptions and foreign keys to default table description
  1012. * Note: This array will be merged with the array from all other implementations
  1013. *
  1014. * @return
  1015. * Array describing the nd_reagent table
  1016. *
  1017. * @ingroup tripal_schema_api
  1018. */
  1019. function tripal_natural_diversity_chado_schema_v1_11_nd_reagent() {
  1020. $description = array();
  1021. $description = array(
  1022. 'table' => 'nd_reagent',
  1023. 'fields' => array(
  1024. 'nd_reagent_id' => array(
  1025. 'type' => 'serial',
  1026. 'not null' => '1',
  1027. ),
  1028. 'name' => array(
  1029. 'type' => 'varchar',
  1030. 'length' => 80,
  1031. 'not null' => TRUE
  1032. ),
  1033. 'type_id' => array(
  1034. 'type' => 'int',
  1035. 'not null' => '1',
  1036. ),
  1037. 'feature_id' => array(
  1038. 'type' => 'int',
  1039. ),
  1040. ),
  1041. 'primary key' => array(
  1042. '0' => 'nd_reagent_id',
  1043. ),
  1044. 'foreign keys' => array(
  1045. 'feature' => array(
  1046. 'table' => 'feature',
  1047. 'columns' => array(
  1048. 'feature_id' => 'feature_id',
  1049. ),
  1050. ),
  1051. 'cvterm' => array(
  1052. 'table' => 'cvterm',
  1053. 'columns' => array(
  1054. 'type_id' => 'cvterm_id',
  1055. ),
  1056. ),
  1057. ),
  1058. );
  1059. return $description;
  1060. }
  1061. /**
  1062. * Implements hook_chado_schema_v1_11_table()
  1063. *
  1064. * Purpose: To add descriptions and foreign keys to default table description
  1065. * Note: This array will be merged with the array from all other implementations
  1066. *
  1067. * @return
  1068. * Array describing the nd_reagent_relationship table
  1069. *
  1070. * @ingroup tripal_schema_api
  1071. */
  1072. function tripal_natural_diversity_chado_schema_v1_11_nd_reagent_relationship() {
  1073. $description = array();
  1074. $description = array(
  1075. 'table' => 'nd_reagent_relationship',
  1076. 'fields' => array(
  1077. 'nd_reagent_relationship_id' => array(
  1078. 'type' => 'serial',
  1079. 'not null' => '1',
  1080. ),
  1081. 'subject_reagent_id' => array(
  1082. 'type' => 'int',
  1083. 'not null' => '1',
  1084. ),
  1085. 'type_id' => array(
  1086. 'type' => 'int',
  1087. 'not null' => '1',
  1088. ),
  1089. 'object_reagent_id' => array(
  1090. 'type' => 'int',
  1091. 'not null' => '1',
  1092. ),
  1093. ),
  1094. 'primary key' => array(
  1095. '0' => 'nd_reagent_relationship_id',
  1096. ),
  1097. 'foreign keys' => array(
  1098. 'nd_reagent' => array(
  1099. 'table' => 'feature',
  1100. 'columns' => array(
  1101. 'subject_reagent_id' => 'nd_reagent_id',
  1102. 'object_reagent_id' => 'nd_reagent_id',
  1103. ),
  1104. ),
  1105. 'cvterm' => array(
  1106. 'table' => 'cvterm',
  1107. 'columns' => array(
  1108. 'type_id' => 'cvterm_id',
  1109. ),
  1110. ),
  1111. ),
  1112. );
  1113. return $description;
  1114. }
  1115. /**
  1116. * Implements hook_chado_schema_v1_11_table()
  1117. *
  1118. * Purpose: To add descriptions and foreign keys to default table description
  1119. * Note: This array will be merged with the array from all other implementations
  1120. *
  1121. * @return
  1122. * Array describing the nd_reagentprop table
  1123. *
  1124. * @ingroup tripal_schema_api
  1125. */
  1126. function tripal_natural_diversity_chado_schema_v1_11_nd_reagentprop() {
  1127. $description = array();
  1128. $description = array(
  1129. 'table' => 'nd_reagentprop',
  1130. 'fields' => array(
  1131. 'nd_reagentprop_id' => array(
  1132. 'type' => 'serial',
  1133. 'not null' => '1',
  1134. ),
  1135. 'nd_reagent_id' => array(
  1136. 'type' => 'int',
  1137. 'not null' => '1',
  1138. ),
  1139. 'type_id' => array(
  1140. 'type' => 'int',
  1141. 'not null' => '1',
  1142. ),
  1143. 'value' => array(
  1144. 'type' => 'varchar',
  1145. ),
  1146. 'rank' => array(
  1147. 'type' => 'int',
  1148. 'not null' => 1,
  1149. 'default' => 1
  1150. ),
  1151. ),
  1152. 'primary key' => array(
  1153. '0' => 'nd_reagentprop_id',
  1154. ),
  1155. 'foreign keys' => array(
  1156. 'nd_reagent' => array(
  1157. 'table' => 'nd_reagent',
  1158. 'columns' => array(
  1159. 'nd_reagent_id' => 'nd_reagent_id',
  1160. ),
  1161. ),
  1162. 'cvterm' => array(
  1163. 'table' => 'cvterm',
  1164. 'columns' => array(
  1165. 'type_id' => 'cvterm_id',
  1166. ),
  1167. ),
  1168. ),
  1169. 'referring_tables' => array(
  1170. ),
  1171. );
  1172. return $description;
  1173. }