tripal_natural_diversity.api.inc 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  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. 'type_id' => array(
  1029. 'type' => 'int',
  1030. 'not null' => '1',
  1031. ),
  1032. 'feature_id' => array(
  1033. 'type' => 'int',
  1034. ),
  1035. ),
  1036. 'primary key' => array(
  1037. '0' => 'nd_reagent_id',
  1038. ),
  1039. 'foreign keys' => array(
  1040. 'feature' => array(
  1041. 'table' => 'feature',
  1042. 'columns' => array(
  1043. 'feature_id' => 'feature_id',
  1044. ),
  1045. ),
  1046. 'cvterm' => array(
  1047. 'table' => 'cvterm',
  1048. 'columns' => array(
  1049. 'type_id' => 'cvterm_id',
  1050. ),
  1051. ),
  1052. ),
  1053. );
  1054. return $description;
  1055. }
  1056. /**
  1057. * Implements hook_chado_schema_v1_11_table()
  1058. *
  1059. * Purpose: To add descriptions and foreign keys to default table description
  1060. * Note: This array will be merged with the array from all other implementations
  1061. *
  1062. * @return
  1063. * Array describing the nd_reagent_relationship table
  1064. *
  1065. * @ingroup tripal_schema_api
  1066. */
  1067. function tripal_natural_diversity_chado_schema_v1_11_nd_reagent_relationship() {
  1068. $description = array();
  1069. $description = array(
  1070. 'table' => 'nd_reagent_relationship',
  1071. 'fields' => array(
  1072. 'nd_reagent_relationship_id' => array(
  1073. 'type' => 'serial',
  1074. 'not null' => '1',
  1075. ),
  1076. 'subject_reagent_id' => array(
  1077. 'type' => 'int',
  1078. 'not null' => '1',
  1079. ),
  1080. 'type_id' => array(
  1081. 'type' => 'int',
  1082. 'not null' => '1',
  1083. ),
  1084. 'object_reagent_id' => array(
  1085. 'type' => 'int',
  1086. 'not null' => '1',
  1087. ),
  1088. ),
  1089. 'primary key' => array(
  1090. '0' => 'nd_reagent_relationship_id',
  1091. ),
  1092. 'foreign keys' => array(
  1093. 'nd_reagent' => array(
  1094. 'table' => 'feature',
  1095. 'columns' => array(
  1096. 'subject_reagent_id' => 'nd_reagent_id',
  1097. 'object_reagent_id' => 'nd_reagent_id',
  1098. ),
  1099. ),
  1100. 'cvterm' => array(
  1101. 'table' => 'cvterm',
  1102. 'columns' => array(
  1103. 'type_id' => 'cvterm_id',
  1104. ),
  1105. ),
  1106. ),
  1107. );
  1108. return $description;
  1109. }
  1110. /**
  1111. * Implements hook_chado_schema_v1_11_table()
  1112. *
  1113. * Purpose: To add descriptions and foreign keys to default table description
  1114. * Note: This array will be merged with the array from all other implementations
  1115. *
  1116. * @return
  1117. * Array describing the nd_reagentprop table
  1118. *
  1119. * @ingroup tripal_schema_api
  1120. */
  1121. function tripal_natural_diversity_chado_schema_v1_11_nd_reagentprop() {
  1122. $description = array();
  1123. $description = array(
  1124. 'table' => 'nd_reagentprop',
  1125. 'fields' => array(
  1126. 'nd_reagentprop_id' => array(
  1127. 'type' => 'serial',
  1128. 'not null' => '1',
  1129. ),
  1130. 'nd_reagent_id' => array(
  1131. 'type' => 'int',
  1132. 'not null' => '1',
  1133. ),
  1134. 'type_id' => array(
  1135. 'type' => 'int',
  1136. 'not null' => '1',
  1137. ),
  1138. 'value' => array(
  1139. 'type' => 'varchar',
  1140. ),
  1141. 'rank' => array(
  1142. 'type' => 'int',
  1143. 'not null' => 1,
  1144. 'default' => 1
  1145. ),
  1146. ),
  1147. 'primary key' => array(
  1148. '0' => 'nd_reagentprop_id',
  1149. ),
  1150. 'foreign keys' => array(
  1151. 'nd_reagent' => array(
  1152. 'table' => 'nd_reagent',
  1153. 'columns' => array(
  1154. 'nd_reagent_id' => 'nd_reagent_id',
  1155. ),
  1156. ),
  1157. 'cvterm' => array(
  1158. 'table' => 'cvterm',
  1159. 'columns' => array(
  1160. 'type_id' => 'cvterm_id',
  1161. ),
  1162. ),
  1163. ),
  1164. 'referring_tables' => array(
  1165. ),
  1166. );
  1167. return $description;
  1168. }