uc_earlybird.install 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * @file uc_earlybird.module
  4. * Schema for uc_earlybird module
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function uc_earlybird_install() {
  10. // TODO The drupal_(un)install_schema functions are called automatically in D7.
  11. // drupal_install_schema('uc_earlybird')
  12. }
  13. /**
  14. * Implements hook_uninstall().
  15. */
  16. function uc_earlybird_uninstall() {
  17. // TODO The drupal_(un)install_schema functions are called automatically in D7.
  18. // drupal_uninstall_schema('uc_earlybird')
  19. }
  20. /**
  21. * @todo Please document this function.
  22. * @see http://drupal.org/node/1354
  23. */
  24. function uc_earlybird_schema() {
  25. $schema = array();
  26. $schema['uc_earlybird'] = array(
  27. 'fields' => array(
  28. 'nid' => array(
  29. 'type' => 'int',
  30. 'unsigned' => TRUE,
  31. 'not null' => TRUE,
  32. ),
  33. 'date' => array(
  34. 'type' => 'int',
  35. 'unsigned' => TRUE,
  36. 'not null' => TRUE,
  37. ),
  38. 'discount' => array(
  39. 'type' => 'varchar',
  40. 'length' => 8,
  41. 'not null' => TRUE,
  42. ),
  43. ),
  44. 'unique keys' => array('nid' => array('nid')),
  45. );
  46. return $schema;
  47. }