tripal_fields_layout.install 1.1 KB

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