tripal_contact.api.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /****************************************************************************
  3. * @section Chado Table Descriptions
  4. ****************************************************************************/
  5. /**
  6. * Implements hook_chado_contact_schema()
  7. * Purpose: To add descriptions and foreign keys to default table description
  8. * Note: This array will be merged with the array from all other implementations
  9. *
  10. * @return
  11. * Array describing the contact table
  12. */
  13. function tripal_stock_chado_contact_schema() {
  14. $description = array();
  15. $description['foreign keys']['cvterm'] = array(
  16. 'table' => 'cvterm',
  17. 'columns' => array(
  18. 'type_id' => 'cvterm_id',
  19. ),
  20. );
  21. return $description;
  22. }
  23. /**
  24. * Implements hook_chado_contact_relationship_schema()
  25. * Purpose: To add descriptions and foreign keys to default table description
  26. * Note: This array will be merged with the array from all other implementations
  27. *
  28. * @return
  29. * Array describing the contact_relationship table
  30. */
  31. function tripal_stock_chado_contact_relationship_schema() {
  32. $description = array();
  33. $description['foreign keys']['cvterm'] = array(
  34. 'table' => 'cvterm',
  35. 'columns' => array(
  36. 'type_id' => 'cvterm_id',
  37. ),
  38. );
  39. $description['foreign keys']['contact'] = array(
  40. 'table' => 'contact',
  41. 'columns' => array(
  42. 'subject_id' => 'contact_id',
  43. 'object_id' => 'contact_id',
  44. ),
  45. );
  46. return $description;
  47. }