notify.install

  1. 7.x modules/notify/notify.install
  2. 6.x modules/notify/notify.install

File

modules/notify/notify.install
View source
  1. <?php
  2. function notify_install()
  3. {
  4. $q = "
  5. CREATE TABLE `notification_history` (
  6. `hid` int unsigned NOT NULL AUTO_INCREMENT,
  7. `cid` int DEFAULT NULL,
  8. `notification_type` varchar(255) DEFAULT NULL,
  9. `content_type` varchar(255) DEFAULT NULL,
  10. `to_user_id` int DEFAULT NULL,
  11. `notification_method` varchar(255) DEFAULT NULL,
  12. `to_address` varchar(255) DEFAULT NULL,
  13. `subject` varchar(255) DEFAULT NULL,
  14. `msg` longtext DEFAULT NULL,
  15. `submitted` int unsigned DEFAULT NULL,
  16. PRIMARY KEY (`hid`) ,
  17. KEY `submitted` (`submitted`) ,
  18. KEY `cid` (`cid`) ,
  19. KEY `to_user_id` (`to_user_id`) ,
  20. KEY `subject` (`subject`) ,
  21. KEY `notification_method` (`notification_method`) ,
  22. KEY `to_address` (`to_address`) ,
  23. KEY `content_type` (`content_type`) ,
  24. KEY `notification_type` (`notification_type`)
  25. ); ";
  26. db_query($q);
  27. }
  28. function notify_update($old_schema, $new_schema) {
  29. if ($old_schema < 2) {
  30. db_query("CREATE TABLE IF NOT EXISTS `notification_history` (
  31. `hid` int unsigned NOT NULL AUTO_INCREMENT,
  32. `cid` int DEFAULT NULL,
  33. `notification_type` varchar(255) DEFAULT NULL,
  34. `content_type` varchar(255) DEFAULT NULL,
  35. `to_user_id` int DEFAULT NULL,
  36. `notification_method` varchar(255) DEFAULT NULL,
  37. `to_address` varchar(255) DEFAULT NULL,
  38. `subject` varchar(255) DEFAULT NULL,
  39. `msg` longtext DEFAULT NULL,
  40. `submitted` int unsigned DEFAULT NULL,
  41. PRIMARY KEY (`hid`) ,
  42. KEY `submitted` (`submitted`) ,
  43. KEY `cid` (`cid`) ,
  44. KEY `to_user_id` (`to_user_id`) ,
  45. KEY `subject` (`subject`) ,
  46. KEY `notification_method` (`notification_method`) ,
  47. KEY `to_address` (`to_address`) ,
  48. KEY `content_type` (`content_type`) ,
  49. KEY `notification_type` (`notification_type`)
  50. );");
  51. }
  52. }

Functions