feed_path_publisher.install 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the feed_path_publisher module.
  5. *
  6. */
  7. /**
  8. * Implements hook_schema().
  9. */
  10. function feed_path_publisher_schema() {
  11. $schema['feed_path_publisher'] = array(
  12. 'fields' => array(
  13. 'fppid' => array(
  14. 'type' => 'serial',
  15. 'unsigned' => TRUE,
  16. 'not null' => TRUE,
  17. 'disp-width' => '10',
  18. ),
  19. 'title' => array(
  20. 'type' => 'varchar',
  21. 'length' => '50',
  22. 'not null' => TRUE,
  23. ),
  24. 'path_prefix' => array(
  25. 'type' => 'varchar',
  26. 'length' => '100',
  27. 'not null' => TRUE,
  28. ),
  29. 'feed' => array(
  30. 'type' => 'varchar',
  31. 'length' => '200',
  32. 'not null' => TRUE,
  33. ),
  34. 'weight' => array(
  35. 'type' => 'int',
  36. 'not null' => TRUE,
  37. 'disp-width' => '11',
  38. ),
  39. ),
  40. 'primary key' => array('fppid'),
  41. 'unique keys' => array(
  42. 'path_prefix' => array('path_prefix', 'feed'),
  43. ),
  44. 'indexes' => array(
  45. 'listing' => array('weight', 'path_prefix', 'title'),
  46. ),
  47. );
  48. $schema['feed_path_publisher_roles'] = array(
  49. 'fields' => array(
  50. 'fpprid' => array(
  51. 'type' => 'serial',
  52. 'unsigned' => TRUE,
  53. 'not null' => TRUE,
  54. 'disp-width' => '10',
  55. ),
  56. 'fppid' => array(
  57. 'type' => 'int',
  58. 'unsigned' => TRUE,
  59. 'not null' => TRUE,
  60. 'disp-width' => '10',
  61. ),
  62. 'show_hide' => array(
  63. 'type' => 'varchar',
  64. 'length' => '50',
  65. 'not null' => TRUE,
  66. ),
  67. 'rids' => array(
  68. 'type' => 'varchar',
  69. 'length' => '100',
  70. 'not null' => TRUE,
  71. ),
  72. ),
  73. 'primary key' => array('fpprid'),
  74. );
  75. return $schema;
  76. }