course_search.install

  1. 7.x modules/course_search/course_search.install
  2. 6.x modules/course_search/course_search.install
  3. 4.x modules/course_search/course_search.install
  4. 5.x modules/course_search/course_search.install

File

modules/course_search/course_search.install
View source
  1. <?php
  2. /**
  3. * Implementation of hook_install
  4. */
  5. function course_search_install() {
  6. if (!db_table_exists("course_rotation_schedule")) {
  7. $query = "
  8. CREATE TABLE `course_rotation_schedule` (
  9. `id` int(11) NOT NULL AUTO_INCREMENT,
  10. `faculty_id` varchar(30) NOT NULL DEFAULT '',
  11. `course_id` int(11) NOT NULL DEFAULT '0',
  12. `term_id` varchar(20) NOT NULL DEFAULT '',
  13. `entry_value` varchar(20) NOT NULL DEFAULT '',
  14. `posted` int(10) unsigned NOT NULL DEFAULT '0',
  15. PRIMARY KEY (`id`)
  16. )";
  17. db_query($query);
  18. }
  19. if (!db_table_exists("course_syllabi")) {
  20. $query = "
  21. CREATE TABLE `course_syllabi` (
  22. `id` int(11) NOT NULL AUTO_INCREMENT,
  23. `course_id` int(11) NOT NULL DEFAULT '0',
  24. `course_perm_id` varchar(20) NOT NULL DEFAULT '',
  25. `filename` varchar(255) NOT NULL DEFAULT '',
  26. `posted` int(10) unsigned NOT NULL DEFAULT '0',
  27. PRIMARY KEY (`id`),
  28. KEY `course_id` (`course_id`),
  29. KEY `perm` (`course_perm_id`)
  30. ) ";
  31. db_query($query);
  32. }
  33. }

Functions

Namesort descending Description
course_search_install Implementation of hook_install