tripal_jbrowse_mgmt.install 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. /**
  3. * Create the schema.
  4. *
  5. * @return array
  6. */
  7. function tripal_jbrowse_mgmt_schema() {
  8. $schema = [];
  9. $schema['tripal_jbrowse_mgmt_instances'] = [
  10. 'description' => 'Hardwoods site JBrowse instances.',
  11. 'fields' => [
  12. 'id' => [
  13. 'type' => 'serial',
  14. 'description' => 'Primary key',
  15. 'not null' => TRUE,
  16. ],
  17. 'uid' => [
  18. 'type' => 'int',
  19. 'description' => 'Submitter\'s User id',
  20. 'not null' => TRUE,
  21. ],
  22. 'organism_id' => [
  23. 'type' => 'int',
  24. 'not null' => TRUE,
  25. ],
  26. 'title' => [
  27. 'type' => 'varchar',
  28. 'length' => 255,
  29. ],
  30. 'description' => [
  31. 'type' => 'text',
  32. 'not null' => FALSE,
  33. ],
  34. 'file' => [
  35. 'type' => 'text',
  36. 'not null' => FALSE,
  37. ],
  38. 'created_at' => [
  39. 'type' => 'int',
  40. 'not null' => 'true',
  41. ],
  42. ],
  43. 'primary key' => [
  44. 'id',
  45. ],
  46. ];
  47. $schema['tripal_jbrowse_mgmt_tracks'] = [
  48. 'description' => 'Hardwoods site JBrowse tracks.',
  49. 'fields' => [
  50. 'id' => [
  51. 'type' => 'serial',
  52. 'description' => 'Primary key',
  53. 'not null' => TRUE,
  54. ],
  55. 'uid' => [
  56. 'type' => 'int',
  57. 'description' => 'Submitter\'s User id',
  58. 'not null' => TRUE,
  59. ],
  60. 'instance_id' => [
  61. 'type' => 'int',
  62. 'not null' => TRUE,
  63. ],
  64. 'organism_id' => [
  65. 'type' => 'int',
  66. 'not null' => FALSE,
  67. ],
  68. 'label' => [
  69. 'type' => 'varchar',
  70. 'length' => 255,
  71. ],
  72. 'track_type' => [
  73. 'type' => 'varchar',
  74. 'length' => 255,
  75. ],
  76. 'file_type' => [
  77. 'type' => 'varchar',
  78. 'length' => 255,
  79. ],
  80. 'file' => [
  81. 'type' => 'text',
  82. ],
  83. 'created_at' => [
  84. 'type' => 'int',
  85. 'not null' => TRUE,
  86. ],
  87. 'is_deleted' => [
  88. 'type' => 'int',
  89. 'not null' => FALSE,
  90. 'default' => 0,
  91. ],
  92. ],
  93. 'primary key' => [
  94. 'id',
  95. ],
  96. ];
  97. return $schema;
  98. }