tripal_fields_layout.install 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Implements hook_schema().
  4. */
  5. function
  6. /**
  7. *
  8. */
  9. function tripal_entities_add_tripal_bundle_panes_table(){
  10. $schema = array (
  11. 'table' => 'tripal_bundle_panes',
  12. 'fields' => array (
  13. 'pane_id' => array (
  14. 'type' => 'serial',
  15. 'not null' => TRUE
  16. ),
  17. 'bundle_id' => array(
  18. 'type' => 'int',
  19. 'not null' => TRUE
  20. ),
  21. 'name' => array (
  22. 'type' => 'varchar',
  23. 'length' => 128,
  24. 'not null' => TRUE
  25. ),
  26. 'weight' => array (
  27. 'type' => 'int',
  28. 'not null' => TRUE
  29. ),
  30. 'settings' => array(
  31. 'type' => 'text'
  32. ),
  33. ),
  34. 'primary key' => array (
  35. 0 => 'pane_id'
  36. ),
  37. 'foreign keys' => array (
  38. 'tripal_bundle' => array (
  39. 'table' => 'tripal_bundle',
  40. 'columns' => array (
  41. 'bundle_id' => 'bundle_id'
  42. ),
  43. ),
  44. ),
  45. 'unique keys' => array (
  46. 'tripal_bundle_panes_name' => array ('name'),
  47. ),
  48. 'indexes' => array(
  49. 'tripal_bundle_panes_bundle_id' => array('bundle_id'),
  50. ),
  51. );
  52. chado_create_custom_table('tripal_bundle_panes', $schema, TRUE);
  53. }