function course_search_install

7.x course_search.install course_search_install()
6.x course_search.install course_search_install()
4.x course_search.install course_search_install()
5.x course_search.install course_search_install()

Implementation of hook_install

File

modules/course_search/course_search.install, line 7

Code

function course_search_install() {
  if (!db_table_exists("course_rotation_schedule")) {
    $query = "
        CREATE TABLE `course_rotation_schedule` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `faculty_id` varchar(30) NOT NULL DEFAULT '',
        `course_id` int(11) NOT NULL DEFAULT '0',
        `term_id` varchar(20) NOT NULL DEFAULT '',
        `entry_value` varchar(20) NOT NULL DEFAULT '',
        `posted` int(10) unsigned NOT NULL DEFAULT '0',
        PRIMARY KEY (`id`)
        )";

    db_query($query);
  }


  if (!db_table_exists("course_syllabi")) {
    $query = "
        CREATE TABLE `course_syllabi` (
          `id` int(11) NOT NULL AUTO_INCREMENT,
          `course_id` int(11) NOT NULL DEFAULT '0',
          `course_perm_id` varchar(20) NOT NULL DEFAULT '',
          `filename` varchar(255) NOT NULL DEFAULT '',
          `posted` int(10) unsigned NOT NULL DEFAULT '0',
          PRIMARY KEY (`id`),
          KEY `course_id` (`course_id`),
          KEY `perm` (`course_perm_id`)
        ) ";

    db_query($query);
  }

}