tripal_natural_diversity.api.inc 20 KB

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