tripal_natural_diversity.api.inc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921
  1. <?php
  2. function tripal_natural_diversity_chado_nd_experiment_schema () {
  3. $description = array();
  4. $description = array(
  5. 'table' => 'nd_experiment',
  6. 'fields' => array(
  7. 'nd_experiment_id' => array(
  8. 'type' => 'serial',
  9. 'not null' => '1',
  10. ),
  11. 'type_id' => array(
  12. 'type' => 'int',
  13. 'not null' => '1',
  14. ),
  15. 'nd_geolocation_id' => array(
  16. 'type' => 'int',
  17. 'not null' => '1',
  18. ),
  19. ),
  20. 'primary key' => array(
  21. '0' => 'nd_experiment_id',
  22. ),
  23. 'foreign keys' => array(
  24. 'nd_geolocation' => array(
  25. 'table' => 'nd_geolocation',
  26. 'columns' => array(
  27. 'nd_geolocation_id' => 'nd_geolocation_id',
  28. ),
  29. ),
  30. 'cvterm' => array(
  31. 'table' => 'cvterm',
  32. 'columns' => array(
  33. 'type_id' => 'cvterm_id',
  34. ),
  35. ),
  36. ),
  37. 'referring tables' => array(
  38. 'nd_experiment_contact',
  39. 'nd_experiment_dbxref',
  40. 'nd_experiment_genotype',
  41. 'nd_experiment_phenotype',
  42. 'nd_experiment_project',
  43. 'nd_experiment_protocol',
  44. 'nd_experiment_pub',
  45. 'nd_experiment_stock',
  46. 'nd_experimentprop'
  47. ),
  48. );
  49. return $description;
  50. }
  51. function tripal_natural_diversity_chado_nd_experiment_contact_schema () {
  52. $description = array();
  53. $description = array(
  54. 'table' => 'nd_experiment_contact',
  55. 'fields' => array(
  56. 'nd_experiment_contact_id' => array(
  57. 'type' => 'serial',
  58. 'not null' => '1',
  59. ),
  60. 'contact_id' => array(
  61. 'type' => 'int',
  62. 'not null' => '1',
  63. ),
  64. 'nd_experiment_id' => array(
  65. 'type' => 'int',
  66. 'not null' => '1',
  67. ),
  68. ),
  69. 'primary key' => array(
  70. '0' => 'nd_experiment_contact_id',
  71. ),
  72. 'foreign keys' => array(
  73. 'nd_experiment' => array(
  74. 'table' => 'nd_experiment',
  75. 'columns' => array(
  76. 'nd_experiment_id' => 'nd_experiment_id',
  77. ),
  78. ),
  79. 'contact' => array(
  80. 'table' => 'contact',
  81. 'columns' => array(
  82. 'contact_id' => 'contact_id',
  83. ),
  84. ),
  85. ),
  86. 'referring tables' => array(
  87. ),
  88. );
  89. return $description;
  90. }
  91. function tripal_natural_diversity_chado_nd_experiment_dbxref_schema () {
  92. $description = array();
  93. $description = array(
  94. 'table' => 'nd_experiment_dbxref',
  95. 'fields' => array(
  96. 'nd_experiment_dbxref_id' => array(
  97. 'type' => 'serial',
  98. 'not null' => '1',
  99. ),
  100. 'dbxref_id' => array(
  101. 'type' => 'int',
  102. 'not null' => '1',
  103. ),
  104. 'nd_experiment_id' => array(
  105. 'type' => 'int',
  106. 'not null' => '1',
  107. ),
  108. ),
  109. 'primary key' => array(
  110. '0' => 'nd_experiment_dbxref_id',
  111. ),
  112. 'foreign keys' => array(
  113. 'nd_experiment' => array(
  114. 'table' => 'nd_experiment',
  115. 'columns' => array(
  116. 'nd_experiment_id' => 'nd_experiment_id',
  117. ),
  118. ),
  119. 'dbxref' => array(
  120. 'table' => 'dbxref',
  121. 'columns' => array(
  122. 'dbxref_id' => 'dbxref_id',
  123. ),
  124. ),
  125. ),
  126. 'referring tables' => array(
  127. ),
  128. );
  129. return $description;
  130. }
  131. function tripal_natural_diversity_chado_nd_experiment_genotype_schema () {
  132. $description = array();
  133. $description = array(
  134. 'table' => 'nd_experiment_genotype',
  135. 'fields' => array(
  136. 'nd_experiment_genotype_id' => array(
  137. 'type' => 'serial',
  138. 'not null' => '1',
  139. ),
  140. 'genotype_id' => array(
  141. 'type' => 'int',
  142. 'not null' => '1',
  143. ),
  144. 'nd_experiment_id' => array(
  145. 'type' => 'int',
  146. 'not null' => '1',
  147. ),
  148. ),
  149. 'primary key' => array(
  150. '0' => 'nd_experiment_genotype_id',
  151. ),
  152. 'foreign keys' => array(
  153. 'nd_experiment' => array(
  154. 'table' => 'nd_experiment',
  155. 'columns' => array(
  156. 'nd_experiment_id' => 'nd_experiment_id',
  157. ),
  158. ),
  159. 'genotype' => array(
  160. 'table' => 'genotype',
  161. 'columns' => array(
  162. 'genotype_id' => 'genotype_id',
  163. ),
  164. ),
  165. ),
  166. 'referring tables' => array(
  167. ),
  168. );
  169. return $description;
  170. }
  171. function tripal_natural_diversity_chado_nd_experiment_phenotype_schema () {
  172. $description = array();
  173. $description = array(
  174. 'table' => 'nd_experiment_phenotype',
  175. 'fields' => array(
  176. 'nd_experiment_phenotype_id' => array(
  177. 'type' => 'serial',
  178. 'not null' => '1',
  179. ),
  180. 'phenotype_id' => array(
  181. 'type' => 'int',
  182. 'not null' => '1',
  183. ),
  184. 'nd_experiment_id' => array(
  185. 'type' => 'int',
  186. 'not null' => '1',
  187. ),
  188. ),
  189. 'primary key' => array(
  190. '0' => 'nd_experiment_phenotype_id',
  191. ),
  192. 'foreign keys' => array(
  193. 'nd_experiment' => array(
  194. 'table' => 'nd_experiment',
  195. 'columns' => array(
  196. 'nd_experiment_id' => 'nd_experiment_id',
  197. ),
  198. ),
  199. 'phenotype' => array(
  200. 'table' => 'phenotype',
  201. 'columns' => array(
  202. 'phenotype_id' => 'phenotype_id',
  203. ),
  204. ),
  205. ),
  206. 'referring tables' => array(
  207. ),
  208. );
  209. return $description;
  210. }
  211. function tripal_natural_diversity_chado_nd_experiment_project_schema () {
  212. $description = array();
  213. $description = array(
  214. 'table' => 'nd_experiment_project',
  215. 'fields' => array(
  216. 'nd_experiment_project_id' => array(
  217. 'type' => 'serial',
  218. 'not null' => '1',
  219. ),
  220. 'project_id' => array(
  221. 'type' => 'int',
  222. 'not null' => '1',
  223. ),
  224. 'nd_experiment_id' => array(
  225. 'type' => 'int',
  226. 'not null' => '1',
  227. ),
  228. ),
  229. 'primary key' => array(
  230. '0' => 'nd_experiment_project_id',
  231. ),
  232. 'foreign keys' => array(
  233. 'nd_experiment' => array(
  234. 'table' => 'nd_experiment',
  235. 'columns' => array(
  236. 'nd_experiment_id' => 'nd_experiment_id',
  237. ),
  238. ),
  239. 'project' => array(
  240. 'table' => 'project',
  241. 'columns' => array(
  242. 'project_id' => 'project_id',
  243. ),
  244. ),
  245. ),
  246. 'referring tables' => array(
  247. ),
  248. );
  249. return $description;
  250. }
  251. function tripal_natural_diversity_chado_nd_experiment_protocol_schema () {
  252. $description = array();
  253. $description = array(
  254. 'table' => 'nd_experiment_protocol',
  255. 'fields' => array(
  256. 'nd_experiment_protocol_id' => array(
  257. 'type' => 'serial',
  258. 'not null' => '1',
  259. ),
  260. 'protocol_id' => array(
  261. 'type' => 'int',
  262. 'not null' => '1',
  263. ),
  264. 'nd_experiment_id' => array(
  265. 'type' => 'int',
  266. 'not null' => '1',
  267. ),
  268. ),
  269. 'primary key' => array(
  270. '0' => 'nd_experiment_protocol_id',
  271. ),
  272. 'foreign keys' => array(
  273. 'nd_experiment' => array(
  274. 'table' => 'nd_experiment',
  275. 'columns' => array(
  276. 'nd_experiment_id' => 'nd_experiment_id',
  277. ),
  278. ),
  279. 'protocol' => array(
  280. 'table' => 'protocol',
  281. 'columns' => array(
  282. 'protocol_id' => 'protocol_id',
  283. ),
  284. ),
  285. ),
  286. 'referring tables' => array(
  287. ),
  288. );
  289. return $description;
  290. }
  291. function tripal_natural_diversity_chado_nd_experiment_pub_schema () {
  292. $description = array();
  293. $description = array(
  294. 'table' => 'nd_experiment_pub',
  295. 'fields' => array(
  296. 'nd_experiment_pub_id' => array(
  297. 'type' => 'serial',
  298. 'not null' => '1',
  299. ),
  300. 'pub_id' => array(
  301. 'type' => 'int',
  302. 'not null' => '1',
  303. ),
  304. 'nd_experiment_id' => array(
  305. 'type' => 'int',
  306. 'not null' => '1',
  307. ),
  308. ),
  309. 'primary key' => array(
  310. '0' => 'nd_experiment_pub_id',
  311. ),
  312. 'foreign keys' => array(
  313. 'nd_experiment' => array(
  314. 'table' => 'nd_experiment',
  315. 'columns' => array(
  316. 'nd_experiment_id' => 'nd_experiment_id',
  317. ),
  318. ),
  319. 'pub' => array(
  320. 'table' => 'pub',
  321. 'columns' => array(
  322. 'pub_id' => 'pub_id',
  323. ),
  324. ),
  325. ),
  326. 'referring tables' => array(
  327. ),
  328. );
  329. return $description;
  330. }
  331. function tripal_natural_diversity_chado_nd_experiment_stock_schema () {
  332. $description = array();
  333. $description = array(
  334. 'table' => 'nd_experiment_stock',
  335. 'fields' => array(
  336. 'nd_experiment_stock_id' => array(
  337. 'type' => 'serial',
  338. 'not null' => '1',
  339. ),
  340. 'stock_id' => array(
  341. 'type' => 'int',
  342. 'not null' => '1',
  343. ),
  344. 'nd_experiment_id' => array(
  345. 'type' => 'int',
  346. 'not null' => '1',
  347. ),
  348. 'type_id' => array(
  349. 'type' => 'int',
  350. 'not null' => '1',
  351. ),
  352. ),
  353. 'primary key' => array(
  354. '0' => 'nd_experiment_stock_id',
  355. ),
  356. 'foreign keys' => array(
  357. 'nd_experiment' => array(
  358. 'table' => 'nd_experiment',
  359. 'columns' => array(
  360. 'nd_experiment_id' => 'nd_experiment_id',
  361. ),
  362. ),
  363. 'stock' => array(
  364. 'table' => 'stock',
  365. 'columns' => array(
  366. 'stock_id' => 'stock_id',
  367. ),
  368. ),
  369. 'cvterm' => array(
  370. 'table' => 'cvterm',
  371. 'columns' => array(
  372. 'type_id' => 'cvterm_id',
  373. ),
  374. ),
  375. ),
  376. 'referring tables' => array(
  377. 'nd_experiment_stock_dbxref',
  378. 'nd_experiment_stockprop',
  379. ),
  380. );
  381. return $description;
  382. }
  383. function tripal_natural_diversity_chado_nd_experiment_stockprop_schema () {
  384. $description = array();
  385. $description = array(
  386. 'table' => 'nd_experiment_stockprop',
  387. 'fields' => array(
  388. 'nd_experiment_stockprop_id' => array(
  389. 'type' => 'serial',
  390. 'not null' => '1',
  391. ),
  392. 'nd_experiment_stock_id' => array(
  393. 'type' => 'int',
  394. 'not null' => '1',
  395. ),
  396. 'type_id' => array(
  397. 'type' => 'int',
  398. 'not null' => '1',
  399. ),
  400. 'value' => array(
  401. 'type' => 'varchar',
  402. ),
  403. 'rank' => array(
  404. 'type' => 'int',
  405. 'not null' => 1,
  406. 'default' => 1
  407. ),
  408. ),
  409. 'primary key' => array(
  410. '0' => 'nd_experiment_stockprop_id',
  411. ),
  412. 'foreign keys' => array(
  413. 'nd_experiment_stock' => array(
  414. 'table' => 'nd_experiment_stock',
  415. 'columns' => array(
  416. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  417. ),
  418. ),
  419. 'cvterm' => array(
  420. 'table' => 'cvterm',
  421. 'columns' => array(
  422. 'type_id' => 'cvterm_id',
  423. ),
  424. ),
  425. ),
  426. 'referring tables' => array(
  427. ),
  428. );
  429. return $description;
  430. }
  431. function tripal_natural_diversity_chado_nd_experiment_stock_dbxref_schema () {
  432. $description = array();
  433. $description = array(
  434. 'table' => 'nd_experiment_stock_dbxref',
  435. 'fields' => array(
  436. 'nd_experiment_stock_dbxref_id' => array(
  437. 'type' => 'serial',
  438. 'not null' => '1',
  439. ),
  440. 'nd_experiment_stock_id' => array(
  441. 'type' => 'int',
  442. 'not null' => '1',
  443. ),
  444. 'dbxref_id' => array(
  445. 'type' => 'int',
  446. 'not null' => '1',
  447. ),
  448. ),
  449. 'primary key' => array(
  450. '0' => 'nd_experiment_stock_dbxref_id',
  451. ),
  452. 'foreign keys' => array(
  453. 'nd_experiment_stock' => array(
  454. 'table' => 'nd_experiment_stock',
  455. 'columns' => array(
  456. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  457. ),
  458. ),
  459. 'dbxref' => array(
  460. 'table' => 'dbxref',
  461. 'columns' => array(
  462. 'dbxref_id' => 'dbxref_id',
  463. ),
  464. ),
  465. ),
  466. 'referring tables' => array(
  467. ),
  468. );
  469. return $description;
  470. }
  471. function tripal_natural_diversity_chado_nd_experimentprop_schema () {
  472. $description = array();
  473. $description = array(
  474. 'table' => 'nd_experimentprop',
  475. 'fields' => array(
  476. 'nd_experimentprop_id' => array(
  477. 'type' => 'serial',
  478. 'not null' => '1',
  479. ),
  480. 'nd_experiment_id' => array(
  481. 'type' => 'int',
  482. 'not null' => '1',
  483. ),
  484. 'type_id' => array(
  485. 'type' => 'int',
  486. 'not null' => '1',
  487. ),
  488. 'value' => array(
  489. 'type' => 'varchar',
  490. ),
  491. 'rank' => array(
  492. 'type' => 'int',
  493. 'not null' => 1,
  494. 'default' => 1
  495. ),
  496. ),
  497. 'primary key' => array(
  498. '0' => 'nd_experimentprop_id',
  499. ),
  500. 'foreign keys' => array(
  501. 'nd_experiment' => array(
  502. 'table' => 'nd_experiment',
  503. 'columns' => array(
  504. 'nd_experiment_id' => 'nd_experiment_id',
  505. ),
  506. ),
  507. 'cvterm' => array(
  508. 'table' => 'cvterm',
  509. 'columns' => array(
  510. 'type_id' => 'cvterm_id',
  511. ),
  512. ),
  513. ),
  514. 'referring tables' => array(
  515. ),
  516. );
  517. return $description;
  518. }
  519. function tripal_natural_diversity_chado_nd_geolocation_schema () {
  520. $description = array();
  521. $description = array(
  522. 'table' => 'nd_reagent',
  523. 'fields' => array(
  524. 'nd_geolocation_id' => array(
  525. 'type' => 'serial',
  526. 'not null' => '1',
  527. ),
  528. 'description' => array(
  529. 'type' => 'varchar'
  530. ),
  531. 'latitude' => array(
  532. 'type' => 'real',
  533. ),
  534. 'longitude' => array(
  535. 'type' => 'real',
  536. ),
  537. 'altitude' => array(
  538. 'type' => 'real',
  539. ),
  540. 'geodetic_datum' => array(
  541. 'type' => 'varchar',
  542. ),
  543. ),
  544. 'primary key' => array(
  545. '0' => 'nd_geolocation_id',
  546. ),
  547. 'referring tables' => array(
  548. 'nd_experiment',
  549. 'nd_geolocationprop'
  550. ),
  551. );
  552. return $description;
  553. }
  554. function tripal_natural_diversity_chado_nd_geolocationprop_schema () {
  555. $description = array();
  556. $description = array(
  557. 'table' => 'nd_geolocationprop',
  558. 'fields' => array(
  559. 'nd_geolocationprop_id' => array(
  560. 'type' => 'serial',
  561. 'not null' => '1',
  562. ),
  563. 'nd_geolocation_id' => array(
  564. 'type' => 'int',
  565. 'not null' => '1',
  566. ),
  567. 'type_id' => array(
  568. 'type' => 'int',
  569. 'not null' => '1',
  570. ),
  571. 'value' => array(
  572. 'type' => 'varchar',
  573. ),
  574. 'rank' => array(
  575. 'type' => 'int',
  576. 'not null' => 1,
  577. 'default' => 1
  578. ),
  579. ),
  580. 'primary key' => array(
  581. '0' => 'nd_geolocationprop_id',
  582. ),
  583. 'foreign keys' => array(
  584. 'nd_geolocation' => array(
  585. 'table' => 'nd_geolocation',
  586. 'columns' => array(
  587. 'nd_geolocation_id' => 'nd_geolocation_id',
  588. ),
  589. ),
  590. 'cvterm' => array(
  591. 'table' => 'cvterm',
  592. 'columns' => array(
  593. 'type_id' => 'cvterm_id',
  594. ),
  595. ),
  596. ),
  597. 'referring tables' => array(
  598. ),
  599. );
  600. return $description;
  601. }
  602. function tripal_natural_diversity_chado_nd_protocol_schema () {
  603. $description = array();
  604. $description = array(
  605. 'table' => 'nd_protocol',
  606. 'fields' => array(
  607. 'nd_protocol_id' => array(
  608. 'type' => 'serial',
  609. 'not null' => 1,
  610. ),
  611. 'name' => array(
  612. 'type' => 'varchar',
  613. 'not null' => 1,
  614. ),
  615. ),
  616. 'primary key' => array(
  617. '0' => 'nd_protocol_id',
  618. ),
  619. 'referring tables' => array(
  620. 'nd_experiment_protocol',
  621. 'nd_protocol_reagent',
  622. 'nd_protocolprop'
  623. ),
  624. );
  625. return $description;
  626. }
  627. function tripal_natural_diversity_chado_nd_protocol_reagent_schema () {
  628. $description = array();
  629. $description = array(
  630. 'table' => 'nd_protocol_reagent',
  631. 'fields' => array(
  632. 'nd_protocol_reagent_id' => array(
  633. 'type' => 'serial',
  634. 'not null' => 1,
  635. ),
  636. 'nd_protocol_id' => array(
  637. 'type' => 'int',
  638. 'not null' => 1,
  639. ),
  640. 'nd_reagent_id' => array(
  641. 'type' => 'int',
  642. 'not null' => 1,
  643. ),
  644. 'type_id' => array(
  645. 'type' => 'int',
  646. 'not null' => 1,
  647. ),
  648. ),
  649. 'primary key' => array(
  650. '0' => 'nd_protocol_reagent_id',
  651. ),
  652. 'foreign keys' => array(
  653. 'nd_protocol' => array(
  654. 'table' => 'nd_protocol',
  655. 'columns' => array(
  656. 'nd_protocol_id' => 'nd_protocol_id',
  657. ),
  658. ),
  659. 'nd_reagent' => array(
  660. 'table' => 'nd_reagent',
  661. 'columns' => array(
  662. 'nd_reagent_id' => 'nd_reagent_id',
  663. ),
  664. ),
  665. 'cvterm' => array(
  666. 'table' => 'cvterm',
  667. 'columns' => array(
  668. 'type_id' => 'cvterm_id',
  669. ),
  670. ),
  671. ),
  672. 'referring tables' => array(
  673. ),
  674. );
  675. return $description;
  676. }
  677. function tripal_natural_diversity_chado_nd_protocolprop_schema () {
  678. $description = array();
  679. $description = array(
  680. 'table' => 'nd_protocolprop',
  681. 'fields' => array(
  682. 'nd_protocolprop_id' => array(
  683. 'type' => 'serial',
  684. 'not null' => '1',
  685. ),
  686. 'nd_protocol_id' => array(
  687. 'type' => 'int',
  688. 'not null' => '1',
  689. ),
  690. 'type_id' => array(
  691. 'type' => 'int',
  692. 'not null' => '1',
  693. ),
  694. 'value' => array(
  695. 'type' => 'varchar',
  696. ),
  697. 'rank' => array(
  698. 'type' => 'int',
  699. 'not null' => 1,
  700. 'default' => 1
  701. ),
  702. ),
  703. 'primary key' => array(
  704. '0' => 'nd_protocolprop_id',
  705. ),
  706. 'foreign keys' => array(
  707. 'nd_protocol' => array(
  708. 'table' => 'nd_protocol',
  709. 'columns' => array(
  710. 'nd_protocol_id' => 'nd_protocol_id',
  711. ),
  712. ),
  713. 'cvterm' => array(
  714. 'table' => 'cvterm',
  715. 'columns' => array(
  716. 'type_id' => 'cvterm_id',
  717. ),
  718. ),
  719. ),
  720. 'referring tables' => array(
  721. ),
  722. );
  723. return $description;
  724. }
  725. function tripal_natural_diversity_chado_nd_reagent_schema () {
  726. $description = array();
  727. $description = array(
  728. 'table' => 'nd_reagent',
  729. 'fields' => array(
  730. 'nd_reagent_id' => array(
  731. 'type' => 'serial',
  732. 'not null' => '1',
  733. ),
  734. 'type_id' => array(
  735. 'type' => 'int',
  736. 'not null' => '1',
  737. ),
  738. 'feature_id' => array(
  739. 'type' => 'int',
  740. ),
  741. ),
  742. 'primary key' => array(
  743. '0' => 'nd_reagent_id',
  744. ),
  745. 'foreign keys' => array(
  746. 'feature' => array(
  747. 'table' => 'feature',
  748. 'columns' => array(
  749. 'feature_id' => 'feature_id',
  750. ),
  751. ),
  752. 'cvterm' => array(
  753. 'table' => 'cvterm',
  754. 'columns' => array(
  755. 'type_id' => 'cvterm_id',
  756. ),
  757. ),
  758. ),
  759. );
  760. return $description;
  761. }
  762. function tripal_natural_diversity_chado_nd_reagent_relationship_schema () {
  763. $description = array();
  764. $description = array(
  765. 'table' => 'nd_reagent_relationship',
  766. 'fields' => array(
  767. 'nd_reagent_relationship_id' => array(
  768. 'type' => 'serial',
  769. 'not null' => '1',
  770. ),
  771. 'subject_reagent_id' => array(
  772. 'type' => 'int',
  773. 'not null' => '1',
  774. ),
  775. 'type_id' => array(
  776. 'type' => 'int',
  777. 'not null' => '1',
  778. ),
  779. 'object_reagent_id' => array(
  780. 'type' => 'int',
  781. 'not null' => '1',
  782. ),
  783. ),
  784. 'primary key' => array(
  785. '0' => 'nd_reagent_relationship_id',
  786. ),
  787. 'foreign keys' => array(
  788. 'nd_reagent' => array(
  789. 'table' => 'feature',
  790. 'columns' => array(
  791. 'subject_reagent_id' => 'nd_reagent_id',
  792. 'object_reagent_id' => 'nd_reagent_id',
  793. ),
  794. ),
  795. 'cvterm' => array(
  796. 'table' => 'cvterm',
  797. 'columns' => array(
  798. 'type_id' => 'cvterm_id',
  799. ),
  800. ),
  801. ),
  802. );
  803. return $description;
  804. }
  805. function tripal_natural_diversity_chado_nd_reagentprop_schema () {
  806. $description = array();
  807. $description = array(
  808. 'table' => 'nd_reagentprop',
  809. 'fields' => array(
  810. 'nd_reagentprop_id' => array(
  811. 'type' => 'serial',
  812. 'not null' => '1',
  813. ),
  814. 'nd_reagent_id' => array(
  815. 'type' => 'int',
  816. 'not null' => '1',
  817. ),
  818. 'type_id' => array(
  819. 'type' => 'int',
  820. 'not null' => '1',
  821. ),
  822. 'value' => array(
  823. 'type' => 'varchar',
  824. ),
  825. 'rank' => array(
  826. 'type' => 'int',
  827. 'not null' => 1,
  828. 'default' => 1
  829. ),
  830. ),
  831. 'primary key' => array(
  832. '0' => 'nd_reagentprop_id',
  833. ),
  834. 'foreign keys' => array(
  835. 'nd_reagent' => array(
  836. 'table' => 'nd_reagent',
  837. 'columns' => array(
  838. 'nd_reagent_id' => 'nd_reagent_id',
  839. ),
  840. ),
  841. 'cvterm' => array(
  842. 'table' => 'cvterm',
  843. 'columns' => array(
  844. 'type_id' => 'cvterm_id',
  845. ),
  846. ),
  847. ),
  848. 'referring tables' => array(
  849. ),
  850. );
  851. return $description;
  852. }