blast_ui.install 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * @file
  4. * Contains hooks to handle installation of this module
  5. */
  6. /**
  7. *
  8. * Implement hook_install()
  9. *
  10. */
  11. function blast_ui_install() {
  12. tripal_create_files_dir('tripal_blast');
  13. }
  14. function blast_ui_schema(){
  15. $schema['blastdb'] = array(
  16. 'description' => t('The base table for blastdb node'),
  17. 'fields' => array(
  18. 'nid' => array(
  19. 'description' => t('The primary identifier for a node.'),
  20. 'type' => 'serial',
  21. 'unsigned' => true,
  22. 'not null' => true,
  23. ),
  24. 'name' => array(
  25. 'description' => t('The name of the blast database'),
  26. 'type' => 'varchar',
  27. 'length' => 255,
  28. 'not null' => true,
  29. ),
  30. 'path' => array(
  31. 'description' => t('The address of the blast database'),
  32. 'type' => 'varchar',
  33. 'length' => 1023,
  34. 'not null' => true,
  35. ),
  36. 'dbtype' => array(
  37. 'description' => t('Type of the blast database'),
  38. 'type' => 'varchar',
  39. 'length' => 8,
  40. 'not null' => true,
  41. ),
  42. ),
  43. 'indexes' => array(
  44. 'name' => array('name'),
  45. ),
  46. 'primary key' => array('nid'),
  47. 'unique keys' => array(
  48. 'nid' => array('nid'),
  49. ),
  50. );
  51. return $schema;
  52. }