calendar.install

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

File

modules/calendar/calendar.install
View source
  1. <?php
  2. /**
  3. * This file should contain only hooks relating to installing, enabling, disabling, and uninstalling this module.
  4. *
  5. */
  6. /**
  7. * Hook install. Called when the module is installed on the admin modules page.
  8. *
  9. */
  10. function calendar_install() {
  11. $q = "
  12. CREATE TABLE `content__appointment` (
  13. `cid` int(10) unsigned NOT NULL,
  14. `vid` int(10) unsigned NOT NULL,
  15. `field__appointment_datetime` datetime DEFAULT NULL,
  16. `field__appointment_duration_minutes` int(11) DEFAULT NULL,
  17. `field__faculty_id` varchar(255) DEFAULT NULL,
  18. `field__student_id` varchar(255) DEFAULT NULL,
  19. `field__appointment_type` varchar(255) DEFAULT NULL,
  20. `field__appointment_msg` longtext DEFAULT NULL,
  21. `field__video_data` longtext DEFAULT NULL,
  22. PRIMARY KEY (`vid`),
  23. KEY `cid` (`cid`),
  24. KEY `field__appointment_datetime` (`field__appointment_datetime`),
  25. KEY `field__duration_minutes` (`field__appointment_duration_minutes`),
  26. KEY `faculty_id` (`field__faculty_id`),
  27. KEY `student_id` (`field__student_id`),
  28. KEY `appointment_type` (`field__appointment_type`)
  29. );
  30. ";
  31. db_query($q);
  32. $q = "
  33. CREATE TABLE `content__schedule_event_type` (
  34. `cid` int(10) unsigned NOT NULL,
  35. `vid` int(10) unsigned NOT NULL,
  36. `field__faculty_id` varchar(255) DEFAULT NULL,
  37. `field__enabled` varchar(50) DEFAULT NULL,
  38. `field__event_duration_minutes` int(11) DEFAULT NULL,
  39. `field__event_buffer_minutes` int(11) DEFAULT NULL,
  40. `field__prevent_less_than_hours` int(11) DEFAULT NULL,
  41. `field__additional_email_msg` longtext DEFAULT NULL,
  42. `field__description` longtext DEFAULT NULL,
  43. `field__video_meeting` varchar(50) DEFAULT NULL,
  44. PRIMARY KEY (`vid`),
  45. KEY `cid` (`cid`),
  46. KEY `field__faculty_id` (`field__faculty_id`),
  47. KEY `field__event_duration_minutes` (`field__event_duration_minutes`),
  48. KEY `field__event_buffer_minutes` (`field__event_buffer_minutes`),
  49. KEY `field__prevent_less_than_hours` (`field__prevent_less_than_hours`),
  50. KEY `field__enabled` (`field__enabled`),
  51. KEY `field__video_meeting` (`field__video_meeting`)
  52. );
  53. ";
  54. db_query($q);
  55. $q = "
  56. CREATE TABLE `content__schedule_unavailable_time` (
  57. `cid` int(10) unsigned NOT NULL,
  58. `vid` int(10) unsigned NOT NULL,
  59. `field__faculty_id` varchar(255) DEFAULT NULL,
  60. `field__days` text DEFAULT NULL,
  61. `field__time_selector` varchar(255) DEFAULT NULL,
  62. `field__day_start_hour` varchar(255) DEFAULT NULL,
  63. `field__day_stop_hour` varchar(255) DEFAULT NULL,
  64. `field__start_time` varchar(255) DEFAULT NULL,
  65. `field__end_time` varchar(255) DEFAULT NULL,
  66. `field__ics_url` text DEFAULT NULL,
  67. PRIMARY KEY (`vid`),
  68. KEY `cid` (`cid`),
  69. KEY `field__start_time` (`field__start_time`),
  70. KEY `field__end_time` (`field__end_time`),
  71. KEY `field__ics_url` (`field__ics_url`(700)),
  72. KEY `field__faculty_id` (`field__faculty_id`),
  73. KEY `field__time_selector` (`field__time_selector`),
  74. KEY `field__day_start_hour` (`field__day_start_hour`),
  75. KEY `field__day_stop_hour` (`field__day_stop_hour`)
  76. );
  77. ";
  78. db_query($q);
  79. }
  80. function calendar_update($old_schema, $new_schema) {
  81. }

Functions

Namesort descending Description
calendar_install Hook install. Called when the module is installed on the admin modules page.
calendar_update