tripal_natural_diversity.schema.inc 27 KB

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