DarkteK

Install de campañas

Jun 24th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. /**
  2. * Implements hook_schema().
  3. */
  4. function bbva_campanias_schema() {
  5. $schema['bbva_campanias'] = array(
  6. 'description' => 'The base table for campaigns.',
  7. 'fields' => array(
  8. 'id' => array(
  9. 'description' => 'The primary identifier for campaign.',
  10. 'type' => 'serial',
  11. 'unsigned' => TRUE,
  12. 'not null' => TRUE,
  13. ),
  14. 'hash' => array(
  15. 'description' => 'Hash',
  16. 'type' => 'int',
  17. 'not null' => TRUE,
  18. 'default' => 0,
  19. ),
  20. 'uid' => array(
  21. 'description' => 'User Id',
  22. 'type' => 'int',
  23. 'not null' => TRUE,
  24. 'default' => 0,
  25. ),
  26. 'id_campania' => array(
  27. 'description' => 'Id campaign',
  28. 'type' => 'int',
  29. 'not null' => TRUE,
  30. 'default' => 0,
  31. ),
  32. 'marca' => array(
  33. 'description' => 'Mark if the person read it',
  34. 'type' => 'int',
  35. 'not null' => TRUE,
  36. 'default' => 0,
  37. ),
  38. 'date_marca' => array(
  39. 'description' => 'The Unix timestamp of the mark.',
  40. 'type' => 'varchar',
  41. 'mysql_type' => 'datetime',
  42. 'not null' => FALSE,
  43. ),
  44. ),
  45. 'primary key' => array('id'),
  46. 'indexes' => array(
  47. 'marca' => array('marca'),
  48. 'id_campania' => array('id_campania'),
  49. 'uid' => array('uid'),
  50. ),
  51. );
  52. return $schema;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment